How to make is so my animation doesn't loop and I cant interact with my enemy after his death animation?

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

public class EnemyHealth : MonoBehaviour
{
    public Animator animator;

    public int maxHealth = 100;
    int currentHealth;


    // Start is called before the first frame update
    void Start()
    {
        currentHealth = maxHealth;
    }

    public void TakeDamage(int damage)
    {
        currentHealth -= damage;

        // hurt animation

        if(currentHealth <= 0)
        {
            Die();
        }
    }

    void Die()
    {
        Debug.Log("Enemy died!");

        
        animator.SetBool("IsDead", true);
        
    }

}

In order to stop animation looping you need to select the Animation in the assets window and disable looping.

To stop interacting after the enemy dies you need to disable his components on death. You go to your Die function and disable the scripts, the collider and everything that he can interact with. In my script i just set the isActive bool value to false. Tell me if you want me to paste my script over here.