The molecular formula for water is H2O, which means it consists of two hydrogen atoms (H) and one oxygen atom (O). The arrangement of atoms in a molecule is determined by the molecular structure and chemical bonds between the atoms.
While it is technically possible to write the formula for water as O2H, it is not the conventionally accepted way to represent the molecule. The convention is to place the atom with the highest electronegativity, in this case, oxygen (O), in the middle. This notation reflects the fact that oxygen is more electronegative than hydrogen and tends to attract electrons more strongly.
The molecular formula, regardless of the order of the atoms, represents the same compound, which in this case is water. The atomic mass and electronegativity of the atoms in water remain unchanged regardless of how the formula is written.
So, while it is possible to write the formula as O2H, it is more common and generally accepted to represent it as H2O, which is a reflection of the convention and the order of the atoms in the molecule.