Energy Produced From The Sun
What is the source of the sun's energy? It is a difficult question to answer, because light and heat from the sun are the basis of almost all life on earth. Sunlight drives plant life via photosynthesis, and animals survive by eating plants. Almost all microscopic forms of life for instance bacteria, and protozoa survive by using the energy of sunlight.
Surface temperature and characteristics
We know that the sun is a sphere with a diameter of 1,400,000 km, and that its outer regions are made up of hot gasses such as hydrogen and helium, and that its surface temperature is about 11,000 degrees Fahrenheit
The best value today for age is 4.6 billions of years. We know from radioactive dating that there are rocks which solidified about 4 billion years ago, and that early microorganisms existed close to 3.5 billion years ago. So gravitation cannot be the explanation for where the sun gets its energy.