Here something that might help
Most scientists believe that for half of Earth's 4.6-billion-year history, theatmosphere contained almost no oxygen. Cyanobacteria or blue-green algae became the first microbes to produce oxygen by photosynthesis, perhaps as long ago as 3.5 billion years ago and certainly by 2.7 billion years ago.