The sun is just a hydrogen bomb held together and fed by gravity.
At its center, where the temperature is estimated to be 15 million degrees K,
600 million tons of hydrogen are fused into 596 million tons of helium every second.
The other 4 million tons, about 0.7 percent, are transformed into energy; they become sunshine.

The origin of chemical elements/life:
An average star, like the sun, would spend a few billon years burning most of its hydrogen into helium and then fizzle out.
In more massive stars, whose cores were squeezed under gravity’s grip to extreme temperatures,
the helium might ignite and burn into carbon and oxygen, while the carbon in turn could ignite and form neon, sodium, and magnesium.
Depending on the mass of the star, neon and oxygen might subsequently burn, in a process that would go all the way up to iron, the most stable element, with each successive stage of burning lasting a shorter period of time.
The star becomes layered, like an onion, with silicon, nickel, oxygen, sulphur, and neon.
When the core finally poops out, unable to get hot enough to ignite the next round of fusion, it collapses; a shock wave rebounds and blows the outer layers of the star into space.
In the most extreme case, that of a supernova, a galaxy’s worth of power briefly erupts through the star, triggering one last frenzy of thermonuclear reactions, which make rare and heavy elements and throw them to the galactic winds.
The ashes from these various explosions, rich in heavy elements, drift and mingle with the clouds of gas and dust that clot the arms of the Milky Way and from which new stars are endlessly condensing.
The whole process repeats itself, each succeeding generation of stars containing a slightly higher percentage of heavy elements or metals.
Stars and galaxies, in this scenario, were hydrogen’s way of bootstrapping itself into oxygen and iron and nitrogen and carbon, into the constituents of life.