Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions
Many people may think that orbitals, or ‘shells’ essentially work like planet orbits around the sun; i.e. no matter how many electrons populate ‘Mercury’, ‘Venus’ and ‘Earth’ or how many protons are in the ‘Sun’ Venus’ orbit will always have the same dimension.

This is very much not so when studing atomic orbitals. The principle of hydrogen-like orbitals (which are the only orbitals that can be exactly calculated with the Born-Oppenheimer–approximation) is that we are dealing with an electron free to rotate and translate on a potential energy surface which is formed by the electrostatic potential of a proton or a nucleus with a charge of $z+$. Commonly, taking the 1s orbital as an example, there is a distance from said nucleus where the probability of locating the electron in the sphere defined by that radius is larger than a certian cutoff value, e.g. $90~\%$. If we go from a hydrogen-like system to a $\ce{He+}$ cation, we are doubling the charge thus strongly increasing the attractive force between nucleus and electron. As such, the $90~\%$-radius is much closer to the nucleus than before.

This holds true with limitations when no longer observing hydrogen-like atoms but actual multi-electron atoms: the more protons in the nucleus the more contracted the orbitals become. While that effect in itself is rather small, the second one is substantial: the higher an ion’s charge is, the more contracted its orbitals become. Therefore, $\ce{Be^2+}$, which is even considered to be the smallest atom or atomic ion known (yes, smaller than hydrogen) is substantially smaller than lithium.

When directly comparing two atom sizes of elements that are above and below each other in the periodic table, naturally under otherwise identical conditions the lower one will be larger; even though it has at least 2 (lithium) more protons it has also started populating an additional shell which is further removed from the nucleus. Similarly, if you compare $\ce{Li+}$ and $\ce{Mg+}$, magnesium will still be substantially larger. (In this case, the additional remaining electron in magnesium’s 3s orbital is the deal breaker but note that the same argument applies to $\ce{C+}$ and $\ce{P+}$ where no shell is completely empty.

As noted before, however, if we substract another electron, i.e. if we compare the isolobal $\ce{Li+}$ and $\ce{Mg^2+}$, the latter’s orbitals shrink substantially. By empirical observations scientists have discovered what is known as the diagonal relationship: two ions that are top-left bottom-right diagonally placed in the periodic table, whereby the bottom-right one’s charge is greater by one, have approximately the same radius.