Sounds like you’re wanting Constraints.
They’re kind of hidden on the physics.
You can selectively lock any axis for motion or angular changes against all things you don’t apply directly.
If you tick the box for X rotation, it can still be spun around the other 2 axis by impacts, but the X rotation will remain exactly where it is.
But you can change its X rotation with set world rotation or set relative rotation.