How to block the movement of the collider on an object?

Hello! I want that when the transform component moves, only the mesh moves, and the collider is blocked (not moving). Is this possible? Tell me please

You could put an empty object that hold the collider on top of the object that holds the mesh, and never move the transform of the object that holds the collider.

Just a quick idea that could work. there might be a more elegant solution somewhere though.