How to make object move but stay within another object? I want to make my donut drop, and at the center of donut there is a cylinder. I want to make it so when the donuts drop, they don't go off from the cylinder.


As you can see from the images, the donut is not in the same position on the cylinder anymore.
this is what you need to setup:

all the involved objects (plane, cylinder, toruses) must have rigid body enabled (to calculate gravity and collisions)
plane and cylinder must be passive, toruses active (they're moving)
all involved objects MUST have all transform applied

Plus, all objects (except plane perhaps) need to have the 'mesh' shape type setting, as shown in the picture. When you need to precisely evaluate complex geometries this is the best setting.
example:

then play the animation to get this: