Heavy elements like carbon, oxygen, and neon are built inside stars through nuclear fusion as they evolve, and then released into space when those stars die.

Big picture: from hydrogen to heavy elements

  • The universe started mostly with hydrogen and helium; heavier elements came later inside stars.
  • As a star ages, its core gets hotter and denser, allowing it to fuse progressively heavier nuclei.
  • Each stage of fusion creates new elements and releases energy, until iron is reached in very massive stars.

So the answer to how are heavy elements such as carbon, oxygen and neon formed during star formation is: they are produced by fusion in stellar interiors (stellar nucleosynthesis), mainly after the initial hydrogen-burning phase, and then spread into space by winds and explosions.

Step 1: Star formation and hydrogen fusion

When a star forms, it starts as a collapsing cloud of gas and dust (a molecular cloud). Gravity pulls this material together, increasing temperature and pressure in the center until nuclear fusion can start.

  • In “normal” stars like the Sun, the first long phase is hydrogen fusion in the core.
  • Hydrogen nuclei (protons) fuse to make helium , releasing energy: this is what makes a star shine for most of its life.

At this stage, the star is not yet producing much carbon, oxygen, or neon; it is mainly converting hydrogen into helium.

Step 2: Making carbon – the triple‑alpha process

When the core hydrogen is used up, the core contracts and heats further. In stars of sufficient mass, this allows helium fusion to begin.

The key reaction is the triple‑alpha process :

  • Two helium nuclei (alpha particles) briefly form an unstable beryllium‑8 nucleus.
  • A third helium nucleus collides with this beryllium‑8 before it decays, producing carbon‑12 and releasing energy.

This is how carbon is formed inside stars: by fusing three helium nuclei in very hot, dense stellar cores.

Step 3: From carbon to oxygen and neon

Once there is enough carbon in the hot core, further fusion reactions can happen in more massive stars.

Oxygen formation

  • Carbon nuclei can capture another helium nucleus (alpha particle) to form oxygen‑16.
  • This is part of what’s called the alpha process , where helium nuclei are added step by step to build heavier even‑proton elements.

So oxygen is mainly produced when carbon made by the triple‑alpha process fuses with helium in hotter, more advanced stars.

Neon formation

At even higher core temperatures in more massive stars:

  • Oxygen and other nuclei can capture more helium nuclei.
  • For example, combining an oxygen nucleus with a helium nucleus can produce neon (such as neon‑20) via alpha‑capture reactions.

These reactions occur in successive “burning” shells in a massive star: a hydrogen‑burning shell, a helium‑burning shell, and deeper carbon‑ and oxygen‑burning shells that produce neon, magnesium, and others.

Where these elements go after they form

It’s not enough to make carbon, oxygen, and neon inside a star; they must also be ejected into space to become part of new stars, planets, and life.

  • Stellar winds: Evolved stars (especially red giants and supergiants) lose their outer layers through strong winds, carrying newly minted carbon and oxygen into the surrounding space.
  • Planetary nebulae: Sun‑like stars shed their outer layers at the end of their lives, enriching nearby gas with elements like carbon and nitrogen.
  • Supernova explosions: Very massive stars explode as core‑collapse supernovae , violently ejecting the heavier elements produced in their interiors, including large amounts of oxygen and neon.

Supernova nucleosynthesis is especially important for elements between about oxygen and rubidium, because shock‑driven reactions during the explosion further process the star’s material.

How this connects to “star formation”

Your phrase “during star formation” can be understood two ways:

  1. Inside the forming star itself:
    • As the protostar contracts and heats, it reaches the point where hydrogen fusion ignites.
    • Only after a long period of hydrogen burning and core evolution do helium fusion and the triple‑alpha process begin, which then create carbon, oxygen, and neon inside that same star.
  1. In the broader cycle of forming new generations of stars:
    • Earlier generations of stars created carbon, oxygen, neon, and many other elements through fusion and supernovae.
    • Their winds and explosions enriched the interstellar gas, so the clouds that later collapsed to form new stars (and planets) already contained these heavy elements.

So the heavy elements in our Sun, the Earth, and our bodies were forged in previous generations of stars , then mixed into the clouds that formed our solar system.

Simple story version

Imagine a cosmic “factory line”:

  1. A cold gas cloud collapses to form a new star.
  2. The young star spends most of its life turning hydrogen into helium.
  3. Later, in its hot, dense core, helium fuses via the triple‑alpha process to make carbon.
  1. Carbon and helium fuse to make oxygen , and, in more massive stars, further reactions build neon and other heavier elements.
  1. When the star dies (especially in a supernova), those elements are blown out into space and mixed into new gas clouds.
  2. New stars and planets form from this enriched gas, continuing the cycle.

That is how heavy elements such as carbon, oxygen, and neon are formed in stars and then recycled into new star systems, including our own. Information gathered from public forums or data available on the internet and portrayed here.