"Coroutine couldn't be started because the game object is inactive!" when it gameobject is active

I am following this tutorial to implement my GameManager. The problem is that I have a button that is linked to the GameManager script contained by the GameManager prefab. The button is supposed to run a piece of code from that script when clicked, but when I click it, I get
“Coroutine couldn’t be started because the game object is inactive!”

So, I implemented a

Debug.Log("Active? " + gm.activeInHierarchy);

and guess what? It tells me IT IS active! What am I supposed to do?

is the script itself enabled? are you calling it on the prefab asset and not the instance (make sure the button is referencing the right thing)? is the error actually talking about some other code and gameobject (clicking on the error should ping/select the object where the error happened)?

The script is enabled. How do I make the button reference the instance? It only appears as GM(clone) while in play mode, so how could I reference the clone and not the prefab?

https://docs.unity3d.com/ScriptReference/UI.Button-onClick.html