To the idea of Sun's fusion reactions, the higher the temperature of the Sun's core is caused by the increase in Helium and Hydrogen reactions hence the same with Earth's.
Thank you for your question. Please don't hesitate to ask in Brainly your queries.