Covalency: It occurs when an element shares electrons with other atoms of the same or different elements in order to achieve a stable electrical state.
Covalency of oxygen:
Normally, oxygen creates two bonds.
valence shell configuration
Due to a lack of valence d orbitals, its valency cannot be extended.
However, due to an additional dative bond created by oxygen using one of its lone pairs
Oxygen has missing electrons in the valence shell so it can form 2 dative bonds.
Therefore it can only form 2 bonds at the most, if both are sigma bonds.
The highest covalency of oxygen is due to the lack of d-orbitals in its valence shell.