The source of energy of the Sun is due to nuclear fusion.
Nuclear fusion is a process where atomic nuclei combine to form a heavier nucleus, releasing a tremendous amount of energy in the process. In the case of the Sun, the primary fusion reaction that occurs is the fusion of hydrogen nuclei (protons) to form helium nuclei.
Within the Sun’s core, where temperatures and pressures are extremely high, hydrogen nuclei collide with each other and overcome their mutual repulsion due to the high kinetic energy involved. This leads to the fusion of hydrogen nuclei to produce helium nuclei. This fusion process releases a significant amount of energy in the form of light and heat.
The energy released from the Sun’s core propagates outward through the layers of the Sun, reaching the surface and eventually radiating into space. This energy is what provides light, heat, and other forms of electromagnetic radiation that we receive on Earth.
It is worth noting that the Sun’s energy production is sustained by a delicate balance between the inward force of gravity and the outward force generated by the energy released through fusion. This equilibrium allows the Sun to maintain its stable size and energy output over long periods.