Write a source of sun/ star's energy?
The pressure and temperature inside the sun is so high that hydrogen atoms in its core are squeezed together until their nucleus fuses, then 2 hydrogen atoms become 1 helium atom, the helium atom has slightly less mass than the 2 hydrogen atoms had and according to Einstein that mass is converted to energy:
This energy is what lights up the sun. Interestingly, this same energy is produced in a hydrogen bomb, the bomb uses a fission reaction to create the temperature and pressure rather than gravity. So essentially the sun's energy is like billions of hydrogen bombs exploding every second.
Most stars like our Sun get their energy from Hydrogen fusion.
There are high temperatures and pressure in the core of the Sun. Protons repel each other because they are positively charged. I the core two protons can get close enough that the strong force overcomes the electrostatic repulsion and binds them into Helium-2.
Helium-2 is very unstable and usually decays back into two protons. Sometimes the weak force is able to turn one of the protons into a neutron, a positron and an electron neutrino. This forms Hydrogen-2 or Deuterium.
The positron soon meets an electron and they annihilate each other releasing energy. The Deuterium fuses with another proton to form Helium-3 which also releases energy and the Helium-3 had less mass that the Deuterium and the proton.
Two Helium-3 nuclei fuse to form helium-4 and two protons and also releases energy as Helium-4 has less mass than its component nucleons.
Larger stars use a different reaction which produces the same result.
So, the Sun generates energy by fusing Hydrogen into Helium-4. As Helium-4 has less mass that four protons (Hydrogen nuclei) the missing mass is converted into energy in the form of high energy photons. The energy produced is described by Einstein's