Kinda lost with animating player from another script

Hey everyone noob question but so am i! Anyways i am trying to make a game and trying to find my own way around. so i got to a point i implement lives to my character and in my gamemanager i want to say when lives <= 0 game over and play the players death animation.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class GameManager : MonoBehaviour
{
    public static GameManager instance;
    public GameObject PlayerDeath;
    public GameObject livesHolder;
    public GameObject gameOverPanel;
    public Text scoreText;
    int score = 0;
    int lives = 5;
    // Start is called before the first frame update
    private void Start()
    {
        gameOverPanel.SetActive(false);
    }
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
    }

    // Update is called once per frame
    void Update()
    {
       
    }
    public void GameOver()
    {
        ObstacleSpawner.instance.gameOver = true;
        StopScrolling();
        gameOverPanel.SetActive(true);
    }

    void StopScrolling()
    {
        TextureScroll[] scrollingObjects = FindObjectsOfType<TextureScroll>();

        foreach (TextureScroll t in scrollingObjects)
        {
            t.scroll = false;
        }
    }

    public void Restart()
    {
        SceneManager.LoadScene("Game");
    }

    public void Menu()
    {
        SceneManager.LoadScene("Menu");
    }

      public void IncrementScore()
   {
       score ++;
       if(scoreText == null) Debug.LogError("scoreText not provided, click this message", gameObject);
       else scoreText.text = score.ToString("0");
   }
        public void DecreaseLife()
   {
       if (lives > 0)
       {
           lives--;
           livesHolder.transform.GetChild(lives).gameObject.SetActive(false);
       }
       else if (lives <= 0)
       {
           //PlayerController Death = PlayerDeath.GetComponent<Death>();
            PlayerController.GetComponent.Death();
            PlayerController.Death();
            //GameManager.instance.GameOver();
            //GameOver();

       }
   }
}

this was my gamemanager and here is my playercontroller

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

public class PlayerController : MonoBehaviour
{
    Rigidbody2D rb;
    public Animator anim;
    bool grounded;
    public bool gameOver = false;

    [SerializeField]
    float jumpForce; 
   
    // Start is called before the first frame update
    private void Awake()
    {
        rb = GetComponent<Rigidbody2D>();
        anim = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0) && !gameOver)
            if (grounded)
                {
                    {
                        Jump();
                    }
                }
    }
    void Jump()
    {
        grounded = false;
        rb.velocity = Vector2.up * jumpForce;
        anim.SetTrigger("Jump");
        GameManager.instance.IncrementScore();
       
    }

    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Ground")
        {
            grounded = true;
           
        }
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.gameObject.tag == "Obstacle")
        {
            Destroy(collision.gameObject);
            GameManager.instance.DecreaseLife();
        }

    }     
    public void Death()
    {
        anim.Play("PlayerDie");
        GameManager.instance.GameOver();
        gameOver = true;
    }
}

anndd im trying somehow to make the player animation run when lives are 0 . thought about doing it in the gamemanager , tried it in the player controller but i cant seem to find my way around google searches! thank you!

i did make it happen by putting everything into the player controller but just for reference if i wanted to have it in another script how would i go about doing that??

Looks as if PlayerController is a monobehaviour and you are trying to call it as if it is static.

You must reference it in your game manager.

public class GameManager : MonoBehaviour
{
    PlayerController playerController;
    private void Start()
    {
        playerController = ObjectHoldingPlayerController.GetComponent<PlayerController>();
    }

Below is an example of a MonoBehaviour that creates a class which would make more sense to do if it is the player’s animator.

Public class Player : MonoBehaviour
{
   PlayerAnimator playerAnimator = new PlayerAnimator();
   void Update()
   {
      if (lives <= 0)
      {
         playerAnimator.Death();
      }
   }
}
Public class PlayerAnimator
{
   //this class handles our player animations
   public void Death()
   {

   }
}