Lifecycle of a star about the same size as the Sun
1. Hydrogen in the star begins to run out
2. Outward force due to fusion energy is less than inward force due to gravity, causing the star to collapse inwards
3. Collapse causes temperature to increase
4. Helium nuclei fuse together to create heavier elements
5. Star expands to form a red giant
6. Red giant stops fusing helium
7. Star shrinks and forms a white dwarf
8. White dwarf gradually cools down and forms a black dwarf