Frozen rotating object that rotates while other objects move inside

How should I do it in case I want to have a frozen rotating object that rotates while other objects move inside. As if it were an hourglass, but with specific objects inside, not through the effect of particles

Welcome aboard!

I think what you are asking for…

Object 1 is still apart from rotation
other objects move around inside object 1

This is quite simple … it comes down to keyframe animation and parenting.
Keyframe animation is like … this object is in this posisiton / rotation on frame 1, this posisiton / rotation on frame 100 … between the frames it moves/rotates smoothly.
Parenting is like … this cube is a child of this disk. When the disk moves the cube moves with it, but you can also animate the cube controlling it’s movement relative to the disk.

You could look up some tutorials on these, or you can start by modelling all you objects.