Here's why:
* Oxidation numbers represent the charge an atom *would* have if all the bonds were ionic. They are a bookkeeping tool to help us understand electron transfer in chemical reactions.
* The oxidation number of a neutral molecule is always 0.
Therefore, the oxidation number of 6H₂O is 0.
However, if you want to know the oxidation number of the oxygen atom in H₂O, it's -2. This is because hydrogen typically has an oxidation number of +1 in compounds, and to make a neutral H₂O molecule, the oxygen needs a -2 charge.