It's important to try and ask everyone you meet, in whatever situation, what pronouns you should use for them. Don't assume that you can tell by their appearance - you can't! For more on this, check out our pronouns poster.
Not everyone is comfortable with being referred to by she/her/hers or he/him/his pronouns. Until you know someone's chosen pronouns for sure, it's best to default to using gender neutral pronouns to refer to them - typically, they/them/their pronouns. This might sound unnatural initially, but think about it - you do it all the time in normal English, and I've done it three times already on this page without it sounding weird!
Plenty of trans and non-binary people choose to be referred to with pronouns other than he, she, or they. Some examples are ze/hir/hirs, xe/xyr/xem, and ey/em/eir - a more extensive list of examples can be found here. You probably won't have seen some of these pronoun sets before. If you aren't sure how to use them in a sentence, it's always okay to ask!
Using the right pronouns for someone, even if they're a set of pronouns you aren't familiar with, is incredibly important. The Pronoun Dressing Room is a really good way to practice using pronouns, as well as a great way for trans or questioning people to try out alternative pronouns for themselves and see how they fit!