Almost 20 galactic years (each galactic year = 230 million solar years) have passed since birth of our sun, and three galactic years have passed since the remarkable formation of life on Earth when atmospheric oxygen concentration significantly increased (during the time period, we have orbited the Milky Way galaxy three times).
Depending on the concentration of oxygen in the atmosphere and changes in life on Earth, each galactic year can be divided into almost regular "three seasons" each year, with oxygen increasing at different slopes in the first and second seasons and decreasing in the third.
As the Sun orbits the Milky Way, it enters and exits the galactic arms at some specific times, which may be the "probable" cause of these near-regular events of massive extinctions and changes in the concentration of atmospheric gases on Earth in each galactic year, due to significant increase in flux of incoming cosmic rays.
There are some main arms of milky way galaxy that sun goes through as travels around the center of the galaxy. When earth enters a galaxy arm, the constant heavy rain of cosmic rays (high-powered) hit our planet's atmosphere at nearly the speed of light. The very high energy cosmic rays break the strands of DNA molecules, damage genes and kill cells (resulting in cell mutations, death and extinction).
The cosmic rays also shatter air molecules high in our atmosphere, collide with atoms and molecules (mainly oxygen and nitrogen) or even split the molecules, and send atomic and subatomic particles showering down on Earth, so-called air shower secondary radiation.
The incoming cosmic rays by colliding with nitrogen molecules, the process replaces one of the 7 protons nitrogen contains with an extra neutron. The resulting atom, now containing 6 protons and 8 neutrons, is one of carbon 14. As result, nitrogen in the atmosphere changes to Carbon-14 by cosmic rays.The generated Carbon-14 (radioactive) then reacts with oxygen in the atmosphere and forms CO2 (as result of this process also, concentration of oxygen is reduced). The CO2 from Carbon-14 is then absorbed by the plants.
In addition, earth temperature may have also rised by increased flux of incoming cosmic rays, increasing water evaporation from oceans into atmosphere (air) that results in higher number of water molecules being spilt by the cosmic rays.
All these events changed the atmospheric gases concentration and life conditions on earth during traveling of sun into each arm of the galaxy.
However, future research will provide a more accurate answer to this question.
More information can be found here:
1- https://www.researchgate.net/publication/256762257_Mass_Extinction_And_The_Structure_Of_The_Milky_Way
2- https://www.space.com/19915-milky-way-galaxy.html
3- https://www.radioactivity.eu.com/site/pages/RadioCarbon.htm