The Sun is a second-generation star, meaning that some of its material came from former stars. Some stars in our galaxy are nearly as old as the expanding universe, which scientists believe originated in the big bang explosion about 14 billion years ago (see Big Bang Theory). In contrast, the Sun is only 4.6 billion years old.
The first stars were composed only of the hydrogen and helium produced in the early universe. These stars are called first-generation stars. Although hydrogen is also the main ingredient of the Sun, it contains heavier elements, such as carbon, nitrogen, and oxygen, as well. These elements formed inside first-generation stars that lived and died before the Sun was born. When these massive, short-lived stars used up their internal fuel, they exploded and ejected the heavier elements into interstellar space. The Sun formed from this material, making it a second-generation star.