Hello, thank you for taking the time to post your question!
You can tell if an element is a metal or nonmetal by examining the number of valence electrons (dots) that the Lewis dot structure has. Metals tend to have a small number of valence electrons – typically one, two or three.
The tendency to lose electrons is a defining characteristic of metals. Nonmetals then tend to have between four to seven valence electrons. The tendency to gain or share electrons is a defining characteristic of nonmetals.
I hope that helps you get moving in a better direction on this type of question! Feel free to reach out if you have any additional questions beyond that :)