Soon after the Universe appeared, the first atomic nuclei were formed, resulting in the Universe being filled with 90% hydrogen nuclei (protons) and 10% helium nuclei. Besides them, there was also a tiny amount of lithium, which did not exceed 0.00001% of all nuclei, while the content of heavier nuclei was even thousands of times less. However, we now have a huge amount of heavy elements in the composition of planets and gas-dust nebulae, and the source of all these substances is stars.

All heavy chemical elements are formed through stars, but the mechanism is different for different chemical elements.