Scientists believe that at the start of the Universe, 13.8 billion years ago only hydrogen gas was present.
All the naturally occurring elements apart from hydrogen have been formed by nuclear fusion in stars.
For example, beryllium and carbon nuclei can be produced from helium nuclei:
During the majority of a star’s lifetime, hydrogen nuclei fuse together to form helium nuclei.
As the star runs out of hydrogen, other fusion reactions take place forming the nuclei of other elements.
Elements heavier than iron are formed in the supernova explosions of high mass stars.
When the supernova explodes, all the elements produced are thrown out into the Universe.
The heavy elements found on Earth, such as gold, came from material thrown out in previous supernova explosions.
The presence of gold and other heavier elements such as uranium in the Earth is evidence that the solar system was formed from the remains of a supernova.