How is the way metals form ions different from the way nonmetals form ions?

Think about this. When Na, a metal, becomes an ion, what must it do? It has one electron in its outside shell. When Cl, a non-metal, forms an ion, what must it do? It has seven electrons in its outside shell. Post your answer here and you will have the answer to your original question.

Na must lose an electron. Cl must gain an electron. Therefore, metals must lose electron(s) and nonmetals must gain electron(s)?

yes.

Correct! The way metals form ions is by losing one or more electrons from their outermost shell, whereas nonmetals form ions by gaining one or more electrons in their outermost shell. This is because metals tend to have fewer electrons in their outer shells and can achieve a stable electron configuration by losing those electrons. Nonmetals, on the other hand, tend to have more electrons in their outer shells and can achieve a stable electron configuration by gaining electrons. So, in summary, metals lose electrons to form positive ions, while nonmetals gain electrons to form negative ions.