When baking a cake you should allow the cake to cool down for at least 10 to 20 minutes.
The reason you want the cake to cool down is to allow the frosting on the cake to go on the cake without melting off of it.
If you add the cake frosting to the cake without allowing it to cool then the cake frosting can and will melt and fall off the cake.
So allow at least 10 minutes for the cake to cool down before adding the frosting.
Also if the cake is still hot when you cut it it may fall apart easily so as long as you wait at least 10 minutes for the cake to cool down before frosting it or cutting it you should be fine.
Usually I allow any cakes I bake to cool down for 20 to 30 minutes before I add frosting because I'm busy with other things anyway.