After the Big Bang, the Universe was made up of hydrogen and some helium. Nucleosynthesis created heavier elements. Young stars form helium out of hydrogen. Later on, helium is converted into heavier elements like carbon, oxygen, silicon, and eventually iron. When a star explodes (either as a nova or as a supernova), they create elements heavier than iron.