If a planet emerges from multiple colliding pieces, that causes its material heat up.
Later, an existing planet is continuously heated by radioactive decay, tidal forces and other effects.
But are planets like the Earth hot because they are
still hot from that time and did not cool, or
heated later with only minor initial heat, or even
both in significant fractions?