How did oxygen originate on Earth?
Oxygen originated on the earth from water.
Initially, the primitive enviroment was anaerobic and abiotic. Durng that anaerobic environment, oxygen was combinrd with carbondioxide and water. Water was in the vapour form.
Gradually, from simple inorganic compouds to complex organic compounds were formed anaerobic environment. These complex organic polymers helped in the origin of life on the earth.
First of all, in simple life form, water was photolysed by the help solar energy and the free molecular oxygen was released into the anaerobic reducung environment. The anaerobic enviroment became aerobic one and the formation of organic compounds were shifted to the living cells only.