Great Oxygenation Event
Photosynthesis was making oxygen both before and after the GOE. Before the GOE, organic matter and dissolved iron chemically captured any free oxygen. Earth has much iron, and iron has higher solubility than its oxides, so the oceans had much dissolved iron. It became iron oxide and made huge deposits of banded iron rock from the Archaean and Proterozoic eras. When not enough iron remained to capture more oxygen, free oxygen accumulated in the atmosphere. This was the GOE.