We all know that hydrogen becomes stable by completing duplet and helium is stable since its valence shell has completed the duplet
Still, other elements don't behave like that. I want to know that why aren't elements like magnesium, beryllium etc, with two valence electrons be unreactive like helium atom, or why can't other elements become stable by completing duplet in the valence shell ?