At the big bang, only hydrogen was formed in the universe and helium is formed from the nuclear fusion of hydrogen, and no other elements were formed. Light elements like hydrogen, helium, and some traces of lithium, beryllium were formed in the nucleosynthesis process at the beginning of the big bang. The early universe was so hot and dense so it acted as a nuclear reactor and hydrogen is fused to form helium. But the universe was not enough hot and dense to form the heavier elements.
Then how heavier elements were formed that we see around us?
we all know that the earth contains heavy elements like silicon, oxygen, carbon, etc. Humans are made up of oxygen, carbon, nitrogen, etc.
where and how all these elements were formed?
The answer is from the stars! It is pretty peculiar.
For the billion years after the big bang, the universe had only hydrogen and helium, since the universe was expanding and started to cool and gravity dominated in some places so, some areas got denser and stars and galaxies were formed.
All heavy elements up to iron were formed inside the core of the stars.
Stars are formed from gas and dust and they convert hydrogen into helium and when all the hydrogen is used up, they rearrange and form into a red giant. In the core of red giant helium is converted into carbon, this reaction of formation of carbon from three helium atoms is called triple-alpha reaction. First, two helium atoms are merged to form beryllium and then another helium is combined with beryllium to form carbon. Three helium atoms are required to form one carbon atom.
Now, when all the helium runs out if, it is a star-like sun then it ejects all the carbon layers and forms a white dwarf of pretty low size. This is the fate of sun-like stars but the stars which are larger than the sun can have the capacity to form all other heavier elements till iron and when the iron state reaches, a star cannot process nuclear fusion so it becomes unstable and explodes into a supernova. In the process of the formation of iron many elements were formed like oxygen, Sulphur, silicon, nickel, etc. so in the explosion, all the iron and other elements were ejected into the universe.
These explosions are called type 2 supernovae. Heavier elements can also be formed by type 1a supernovae (supernova that occurs in the binary system of stars)
The elements which are heavier than iron cannot be formed in the core of the star. Iron is the most stable product in the process of nuclear fusion. Nuclear fusion does not support the formation of elements that are heavier than iron.
The remaining heavy elements were formed in the supernova by the process called neutron capture process they are two types of processes for the formation of heavy elements, s-process, and r-process. In supernovae, we observe a rapid neutron capture process (r-process)
There is a recent discovery that collisions of neutron stars can also form heavier elements.
Therefore, we are made up of Steller matter. The matter we see around us and everything is formed from the stars!