Some time in Earth's early history, the planet took a turn toward habitability when a group of enterprising microbes known as cyanobacteria evolved oxygenic photosynthesis—the ability to turn light and water into energy, releasing oxygen in the process.
source https://phys.org/news/2021-09-zeroing-earth-important-evolutionary.html