in the above ruels to ditermine the oxidation No. the second point states
The oxidation number of a monoatomic ion is equal to the charge of the ion. For example, Mg2+ has oxidation number +2; Cl− has oxidation number −1.
here Mg2+ is not a monoatomic ion ?Yes! the Mg+2 is a monoatomic divalent cation, means it has only one atom so it is a monoatomic ion while it has a double + charge so it is a divalent cation.
The polyatomic ion means an ion which has more than one atoms like CO3-2 is a polyatomic cation.
In case of Mg+2 ion, the oxidation no. is equal to the charge i.e. +2 .