The primordial atmosphere
Today, our atmosphere is composed of about 21% of oxygen, 78% of nitrogen, and 1% of small quantities of various gases: argon, neon, hydrogen, etc. But it has not always been so! It is estimated that Earth's primordial atmosphere - about 4.5 billion years ago - was mostly composed of hydrogen, nitrogen, carbon dioxide (CO2), ammonia (NH3) and methane (CH4). No oxygen, therefore! Or in very small quantities, of the order of only 0.0001%.
Therefore, we are talking about the absence of O2 gas , at that time.  Paradoxically, the oxygen atoms were  all there, and they were  even among  the most abundant elements on earth. But for the most part they were linked to carbon to form CO2 or trapped in rocks of the crust and mantle.

All this changed with the appearance of life about 3.5 billion years ago. A key element of life as we know it, is the ability to produce organic carbon molecules (such as carbohydrates, proteins or lipids), which serve as sources of energy. To make them, living organisms have to find carbon. The first bacteria found their carbon by picking up what came within their reach as nutrients (humans do the same). But about 2.7 billion years ago, a new type of bacteria appeared: cyanobacteria.

Cyanobacteria were the first to invent photosynthesis as we know it. From CO2, water and solar energy, these bacteria - sometimes also called blue-green algae - were able to capture the carbon in the CO2, while rejecting oxygen! Unlike plants (which convert mineral nitrogen into organic nitrogen) and animals (which convert organic nitrogen into another organic nitrogen), cyanobacteria (and a few others) are able to take nitrogen directly into the air, gaseous form, and turn it into organic nitrogen. They thus put 100 million tons of mineral nitrogen a year at the disposal of plants on the planet.
Cyanobacteria, which make up a good part of phytoplankton, contribute significantly to the surface fixation of oceans, atmospheric carbon dioxide (CO2). This role is of major importance today because of the increased production of this greenhouse gas by human activities.
As an essential link in oceanic food chain, they contribute greatly to the transformation of CO2 into carbon (the organic pump) and its storage in deep ocean sediments (carbon sinks), in reserve for the future needs of the planet.

Air Composition
Dioxygen, O2: 20.9476%
Nitrogen, N2: 78.084%
Argon, Ar: 0.934%
Carbon dioxide, CO2: 0.0314%
Hydrogen, H2: 0.000 05%
Neon, Ne: 0.001 818%
Helium, He: 0.000 524%
Krypton, Kr: 0, 000 114%
Xenon, Xe: 0.000 008 7%

The measurement of oxygen content in inhaled air is fundamental to health, (as well as we measure the various primary pollutants: oxides of carbon, sulfur, nitrogen, VOCs, PM10 and PM2.5 particles , metals or light hydrocarbons and ozone), the constant must be 21%.