How do I prevent my objects from moving in collisions?

I have objects falling from above. And these are stacked to form a tower. I want the objects not to move with collisions after the tower is formed. For this I tried the codes below but it didn’t work. Which solution is needed?[167583-ekran-alıntısı.png|167583]

I think it’s too late to set the Rigidbody type in OnCollisionEnter(). You need to determine when the tower is stacked and go through all “fall”-objects and set the Rigidbody isKinematic to true, so they are not affected by physics… But I’m not sure.
How much do they move? Do they stop moving after you set isKinematic to true, so they are only moving for a single frame?

I think you could just freeze their Rigidbodies on X Y and Z, so they wont move at all after they landed