100k GameObjects Collider Optimization, Help

if I move away from the objects, the collider in the object will not be needed, I solved this problem in the script, but there are a lot of 100 thousand objects in the game, if I put a script on all of them, the 100 thousand objects are a burden for optimization. How can I turn off the object collider if the player moves away from the objects for this many objects?

You can have a global CollisionManager that oversees all the colliders in the game , the manager can split the world into a grid cells , and only simulate the colliders around the player , the manager should keep track of the player’s position and only keep the releavant objects simulated/activated.

Group the objects
ie create a parent game object that will have 1000(value can change) of the gameObjects.
then put the script on the parent not children
if you still get bad performance
you can use burst and jobs and as a last resort ECS