https://docs.unity3d.com/6000.2/Documentation/ScriptReference/GameObject.SetActive.html
Deactivating a GameObject disables each component, including attached renderers, colliders, rigidbodies, and scripts. For example, Unity will no longer call MonoBehaviour.Update on a script attached to a deactivated GameObject. Deactivating a GameObject also stops all coroutines attached to it.