How to make many objects collide and not stutter

I have I game that has many objects and want them to collide how do I make it so that when they collide they don’t lag out sometimes they don’t even collide at all. I know this works as I had it working before but then I updated their collision masks and it broke, and I haven’t been able to fix it.