You have to create static bool in one class which will contain info about, does it have to activate. In separate script you add OnTriggerEnter and OnTriggerExit and in another case OnCollisionEnter and OnCollisionExit, and one bool to select if it’s GroundTriggerCollider or GroundCollider.
Than just based static bool you just get all objects in scene using GameObject.FindObjectsOfType() and using System.Linq you use method find, where you select that x.name = “GroundCollider”.