Panel GameObject not activating when called from another script

I want to enable my panel gameobject when I interact with something but it doesn’t get enabled when I tell it to do so. I referenced it in the inspector and the console doesn’t show any errors. I’m calling the SetDetailText function in another script. And what’s weird is that the text does get updated AFTER I stop the game.

Here is my code:

public class GameManager : MonoBehaviour
{
    //Objects
    public GameObject statusPanel;
    public Text statusText;
 
    //Private
    float textCooldownTime;
 
    void Start()
    {
        statusPanel.SetActive(false);
        textCooldownTime = 2.0f;
    }
 
    void Update()
    {
        if (statusPanel.activeSelf)
        {
            textCooldownTime -= Time.deltaTime;
            if (textCooldownTime < 0)
            {
                statusPanel.SetActive(false);
                textCooldownTime = 2.0f;
            }
        }
    }
 
    public void SetDetailText(string details)
    {
        statusPanel.SetActive(true);
        statusText.text = details;
    }
}

textCooldownTime isn’t reset to 2.0 when SetDetailText is called. This means that it should work once, but the second time you do this, the following Update will immediately deactivate the panel again, as textCooldownTime is still < 0.