The element that has the electron configuration of argon (Ar) when it has a stable electron configuration is potassium (K).
Potassium (K) has an atomic number of 19. Its electron configuration is
The other elements mentioned (oxygen, magnesium, and bromine) do not achieve the electron configuration of argon as stably as potassium does when they form their ions.