In the universe there were enormous clouds of hydrogen. Gravityparticles went through these clouds and losed part of their velocity. Kinetic energy was transferred ln heat. The temperature of the hydrogen increased. The temperature became very high and the conversion of hydrogen to helium began.
In the earth also gravityparticles lose part of their velocity. Kinetic energy is transferred to heat. That is the cause or one of the causes of the earthheat.