Second ionization enthalpy of Na is greater than that of Mg.
valency of sodium is 1 which means it has to lose one electron to get a stable noble gas configuration i.e Neon's configuration.
So after it losing its one electron it becomes more stable by attaining noble gas configuration and hence more enthalpy is required to remove an electron from the stable atom hence the second ionisation enthalpy of sodium is greater than that of Magnesium.