About 4.6 billion years ago, the explosion of a nearby star emits a gravitational wave that causes the collapse of the center of the proto-solar nebula: A proto-sun appears, surrounded by a disk of matter from which the planets will be derived.
Under the effect of gravitation, the proto-sun compresses by continuing to aggregate the surrounding gas, up to a million degrees, the temperature at which the internal pressure triggers the nuclear fusion of the hydrogen atoms: the sun becomes visible.
If the mass of the sun had been only 8% of what it is, this process would not have taken place and the proto-sun would have become a brown dwarf, a "failed" star.
30 million years after the initial collapse of the proto-solar cloud, the nuclear fusion reactions triggered in the heart of the sun bring it into its adult star phase that has been going on for 4.57 billion years.
With a diameter of 1.4 million kilometers (1200 times that of the Earth), the Sun is an average star that, when it has finished transforming hydrogen into helium, will expand to become a red giant.
During this phase of red giant, the process of nuclear fusion will race to produce in one billion years other atoms, including carbon and oxygen. It will then collapse to become a white dwarf, the size of the Earth, which will have disappeared, but of an extraordinarily higher density.