Transgender people don't get names, they get preferred names.
Transgender people don't get pronouns, they get preferred pronouns.
This is a mentality that a lot of people seem to have. Sometimes, I even say "What are your preferred pronouns?" Pronouns aren't preferred, however. They ARE someone's pronouns. My pronouns are he, him, and his for example. My friend's pronouns are they, them, and their(s).
When asking someone who is transgender or non-binary what their pronouns are, or what name they use, instead of saying, "What is your preferred name," or "What are your preferred pronouns," ask them what their pronouns are. Ask them what their name is.
"What is the name you go by?" or "What are your pronouns?" are much better questions if you ask me.
Asking someone one on one is much safer as well. If someone is not out to their family and friends for whatever reasons, or if you don't know if they are out to their family and friends, ask when it is just you and that person. While some people may get upset, it is more polite to ask than to assume. In my case, I rarely correct people because I am afraid of correcting them and I feel like I will be rude if I correct them. It's also easier for me to avoid confrontation.
Asking rarely does any harm.
Other questions you should avoid are: "Are you getting the surgery?" "Have you gotten the surgery?" "So what are you really?" These questions are rude and unnecessary. It's usually none of your business.