To reduce the lag in my project I want to disable the mesh renderer in some objects but I still need their collider so other objects can detect them and interact with them, can I simply disable the mesh renderer so Unity won’t render them but they would still be there so other objects can detect them with physics.raycast?
Yes, absolutely. As long as the mesh that your MeshCollider components are using is available, physics should be fine. It doesn’t need anything to be drawn on the screen by renderers in order to function.