We have Mg and Mg2+.
In Mg2+, 2 electrons are lost from Mg.
When 2 electrons are lost, the net negative charge of atom decreases. So, the nucleus, now has greater positive charge than the negative charge. That is effective nuclear charge increases.
So, the nucleus pulls electrons towards itself more strongly, so atom shrinks, amd decreases in size.
So, Mg2+ is smaller than Mg
Now, look at Cl and Cl-.
Cl- and has 1 more electron than Cl. So, the effective nuclear charge in Cl- is less than that in Cl, as Cl-and has more electrons.
So, electrons of Cl- can escape nuclear pull, and hence it increases in size.
So, Cl is smaller than Cl-.
Cations are smaller and anions are larger than parent atoms.