Chapter 2.4.1. The energy lost by the inward movement of nickel-iron within...
b. gravitational, kinetic, thermal
The above explains the mechanism of the core forming process on earth/planet.
It is believed that this process might has contributed significantly to a planet's early stages heating. The time when these core-forming event happened is thought to have been mainly completed very early when Earth was young . The type of this event rather than it being seen as a single catastrophic event, it is likely to have been as a result of contractions on the earth severally.
The addition of partially differentiated material from another giant impact the rate of this spasm , and it increases each time the planet's mass is to increased.
This is a little on the history of planetary evolution.