Each of the atoms in our body and in the objects we use on a daily basis has a different origin. Some were formed during the first moments of the universe, others inside stars that died long ago, still others during the explosive collision of a pair of neutron stars or during the nuclear fission of other heavier elements. The different processes capable of creating new atomic nuclei are called nucleosynthesis.
All the Hydrogen and the vast majority of the Helium present in the universe today, and therefore on Earth, were formed during the first 20 minutes of the life of the universe . After the Big Bang, the plasma of quarks and gluons that filled everything cooled down and from this the first protons and neutrons were formed (which are made up of the lightest quarks, called u and d). In principle, a similar amount of both nucleons was formed, since they have a very similar mass, but since the neutron is unstable, there were soon more protons than neutrons. While this was happening, some of those protons and neutrons merged and gave rise to atomic nuclei heavier than that of Hydrogen , which consists of a single proton. Most of the neutrons that had not disintegrated ended up forming Helium nuclei (with 2 protons and 2 neutrons), while a very small part (less than 1%) ended up in Lithium (3p and 3 or 4n) and Deuterium (1p and 1n, also called heavy Hydrogen). This resulted in an approximate composition of 75% Hydrogen, 24% Helium and 1% of the rest of the elements.
After these first few minutes, the universe cooled too much for these nuclear fusion processes to continue, and the composition of the universe was paralyzed until the arrival of the first stars . These have been responsible, through several different processes, for the production of any chemical element heavier than Lithium). The Carbon of the organic molecules, the Oxygen that we breathe, the Iron of our steel, the Sodium of the salt or the Uranium that we use to produce energy have their origin in the stars. Well, almost all of them, because as far as we know, boron and beryllium are currently only formed in spallation processes (or splintering, if we translate the origin of the word, spall, into Spanish) by the collision of cosmic rays with gases of the atmosphere.
Since the appearance of the first stars, they have been creating new metals (as any element heavier than Helium is called in astrophysics). However, this process is so relatively slow that the composition of the universe remains practically the same, the proportion of metals having increased from 1% to 2% only.
Elements with Oxygen, Carbon or Neon are created in (relatively) large quantities inside stars , but remain in stars for billions of years. The elements between Oxygen and Rubidium (about 30 different elements), at least the nuclei of these elements that manage to escape from their stars, have their origin in stellar explosions. Supernovae, but also in processes like the one that will happen to the Sun in about 5 billion years, in which it will expel its outer layers before becoming a white dwarf.
Normally, during the nuclear fusion that takes place inside stars and that makes them shine, elements heavier than iron or nickel cannot be formed (the latter is not formed by nuclear fusion, but by rapid neutron capture), because when elements heavier than iron are produced, energy begins to be lost instead of gaining it, rapidly destabilizing the star. However, during a supernova explosion (which can have several different origins) the energy released is such that large amounts of elements such as Copper, Zinc or Arsenic can be formed.
Until just a few years ago, we believed that even heavier elements, such as Iridium, Gold or Uranium, should be formed during these explosions. However, these elements have a large proportion of neutrons, which is difficult to find during a supernova. A process that, by definition, has a surplus abundance of neutrons is the collision of two neutron stars. It had been suspected that these heavier elements could be formed during these collisions, but it was not until 2017 (Abbott et al, 2017) that observational evidence of this was obtained.
Because of these discoveries we now think that the vast majority of elements heavier than Rubidium are formed in this way. A study published in 2021 (Hsin-Yu Chen et al, 2021) compares the contributions to the formation of these elements from both colliding nutron stars and a nutron star and a black hole. The conclusion is that the collision of the pair of neutron stars would be the main source of these. Therefore, if you have any jewelery that contains some Silver, Gold or Platinum, an incandescent light bulb with a Wolfram filament or some metal piece that contains Lead, you may be interested to know that, most likely, those atomic nuclei were forged during the collision of two neutron stars light years from here.
Abbott et al, 2017, Estimating the Contribution of Dynamical Ejecta in the Kilonova Associated with GW170817, The Astrophysical Journal Letters, 850 (2), https://doi.org/10.3847/2041-8213/aa9478Hsin-Yu Chen et al, 2021, The Relative Contribution to Heavy Metals Production from Binary Neutron Star Mergers and Neutron Star–Black Hole Mergers, The Astrophysical Journal Letters, 920 (1), https://doi.org/10.3847/2041-8213/ac26c6