We perceive a world of great diversity but numberless things are composed of about a hundred different chemical elements, among them, hydrogen, carbon, nitrogen, oxygen, iron, uranium. These elements are combined with one another in a multitude of ways to produce the complexity of all objects.
However, there are only three nucleosynthetic astrophysical sites: i) big bang nucleosynthesis, where hydrogen and helium are produced ii) stars, where all elements from carbon to uranium are synthesized and iii) interstellar medium in galaxies where lithium (a part of), beryllium and boron are made by non thermal collisions between cosmic rays and interstellar matter.
The origin of the atoms is now well understood. It is one of greatest astrophysical discovery in the XXth century. All the elements in the Mendeleiev table, and specifically the atoms of life: carbon, nitrogen and oxygen, come from the work of all generations of stars in galaxies.
Presently, after 13.8 Gyr, atomic matter in the Universe is composed of 70 % hydrogen, 28 % helium and only about 2 % by mass, of all the other elements. Complex (and also some specific light) atoms are rare in the Universe.