Immediately after the Big Bang, which occurred 13.8 billion years ago, the universe consisted primarily of two chemical elements: hydrogen, which has one proton in its nucleus, and helium, which contains two protons. These two elements are the lightest in the periodic table. It is important to note that these elements were abundant—there was enough of this gas to form all the ordinary matter in the cosmos, as the gas also possesses mass, as demonstrated by atmospheric pressure on Earth.
Everything that has mass exerts gravitational attraction. These accumulations of gas began to concentrate into increasingly dense clouds. Extreme compression and heating then forced atoms to merge into larger atoms, releasing energy, which led to the birth of stars and heavier elements.
Physicists long assumed that in the early stages of the universe's existence, only pristine stars composed of hydrogen and helium, known as 'Population III stars,' were present. These were supposed to be the ones that would begin synthesizing heavier atoms and dispersing them throughout space.
However, recent observations obtained using the James Webb Telescope, launched into space in 2021, show that just 700 million years after the Big Bang, three galaxies already exhibited the presence of carbon, oxygen, and silicon in their vicinity, with some of this material 'contaminating' the surrounding space. If these heavier elements spread so early, it means that there were not as many Population III stars as previously thought, which explains why we have never observed them.
