the earliest cells were formed by cells that don't need oxygen to survive but they did produce oxygen to the water. The oxygen got sucked up by iron deposits in the waters at first. Then the oxygen started to oxygenate the water and air where as evolution interfered eucryotic cells formed and evolved creating life with a Biosphere.