What does oxygen do during photosynthesis?

Oxygen doesn't do anything during photosynthesis, oxygen is produced when photosynthesis occurs and is then released from the plants.