How to stop triggered animation in unity?

I’m actually trying to create a game in which the player is set to idle animation by default, so upon trigger when the hook grabs the jewel the rope wrap animation starts but I cant seem to be able to stop the rope wrap animation and go back to idle. Can anyone assist me with this?

This is the code for the Player Animation Script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerAnimation : MonoBehaviour
{
    private Animator anim;

    void Awake()
    {
        anim = GetComponent<Animator>();
    }

    public void IdleAnimation()
    {
        anim.SetTrigger("Idle");
    }

    public void PullingItemAnimation()
    {
        anim.SetTrigger("ropeWrap");
    }

}

This is the code for the Hook Script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HookScripts : MonoBehaviour
{
    [SerializeField]
    private Transform itemHolder;

    private bool itemAttached;

    private HookMovement hookMovement;

    private PlayerAnimation playerAnim;

    void Awake() {
        hookMovement = GetComponentInParent<HookMovement>();
        playerAnim = GetComponentInParent<PlayerAnimation>();
    }

    void OnTriggerEnter2D(Collider2D target) {

        if (!itemAttached && (target.tag == Tags.PINK_GEM || target.tag == Tags.GREEN_GEM || target.tag == Tags.BLUE_GEM
        || target.tag == Tags.ORANGE_GEM || target.tag == Tags.PURPLE_GEM
        || target.tag == Tags.LIGHT_BLUE_GEM || target.tag == Tags.PINK_GEM_SMALL
        || target.tag == Tags.LARGE_STONE || target.tag == Tags.SMALL_STONE)){

            itemAttached = true;

            target.transform.parent = itemHolder;
            target.transform.position = itemHolder.position;
            // Set the position of the hook to the position of the item

            hookMovement.move_Speed = target.GetComponent<ItemScripts>().hook_Speed;

            hookMovement.HookAttachedItem();

            //animate player
            playerAnim.PullingItemAnimation();


            if (target.tag == Tags.PINK_GEM || target.tag == Tags.GREEN_GEM || target.tag == Tags.BLUE_GEM
                || target.tag == Tags.ORANGE_GEM || target.tag == Tags.PURPLE_GEM
                || target.tag == Tags.LIGHT_BLUE_GEM || target.tag == Tags.PINK_GEM_SMALL)
            {

                SoundManager.instance.HookGrab_Jewel();
            }
            else if (target.tag == Tags.LARGE_STONE || target.tag == Tags.SMALL_STONE){

                SoundManager.instance.HookGrab_Stone();
            }

                SoundManager.instance.WinchCrank(true);

        } // If the target is an item

        if (target.tag == Tags.DELIVER_ITEM){

            if(itemAttached){

                itemAttached = false;
                Transform objChild = itemHolder.GetChild(0);
                objChild.parent = null;
                objChild.gameObject.SetActive(false);

                playerAnim.IdleAnimation();
                SoundManager.instance.WinchCrank(false);
            }
        }// Remove items after winching

    }// On trigger enter
}

bro i have the same question