When you accidentally misgender someone or use the wrong pronouns it can be difficult to know what to do. I'm going to go over a few ways that you can be continue to have the person feel supported when you make this mistake.
One of the most common times that you may mess up someone's pronouns is when you're talking or thinking ABOUT them. This isn't a think people talk about a whole lot but I think it's important address. The best way to adjust when someone changes pronouns is to always always always correct yourself when you make a mistake. In your head it can look like this: When I saw her. him. When I saw him. Correcting yourself in your head, though it can seem unimportant, is a crucial step in getting pronouns right when you're speaking out loud. When you are talking with someone and you misgender a person you're talking about, you should do the same thing. Correct yourself. It can be embarrassing at times but I think that is better than letting yourself stop trying to adjust to their pronouns.
Then, of course, there are the times when we misgender someone to their face. This often feels uncomfortable for everyone involved, especially when it's not addressed. If this happens the best thing to do is to apologize immediately, correct yourself, and let them know that you're still adjusting to their pronouns. This is something that they deal with frequently and they will appreciate the sentiment.