Volcanoes put the CO2 into the atmosphere but decreased in activity over time.
Sea creatures capture the carbon in shells then sink to the bottom. Think limestone and other rocks.
CO2 in atmosphere drops.
The earth was a couple million years away from the point where CO2 would be too low to support plant life.
Then man came along, burned coals and oil and saved the planet.