1. You didn't use enough dry ingredients (flour/ cocoa/ sugar).
That prevents the cake from staying in shape after being cooled down.
2. Poor quality dry ingredients.
Make sure to follow a good recipe and use high quality ingredients.
3. You mixed everything on high speed
This gets rid of needed air bubbles
4. You opened the oven in the process of baking
5. You got it out of the oven too soon
6. You used a spoon or a mixer to combine the wet and dry ingredients
Use only a silicone spatula
7. The dough isn't baked