Explanation:
Two oxygen atoms bonds with each other via covalent bonding.
In the formation of covalent bonds, two atoms with little to no electronegativity difference combines by sharing of the valence electrons. This why homonuclear molecules can be formed.
For the oxygen atom with 6 valence electrons;
two electrons are shared by each atoms to make a complete octet and a stable molecule.