People will tell you that there’s no secret to writing characters who are different than you. “Just write them like people!”
Well, those people are full of shit.
The thing is, people of different races, sexual orientations, gender identities – they all have very unique ways of living, approaching different situations, and thinking. So writing them “just like anyone else” often comes across as writing them as straight, cisgender, and white.
Every community has its own culture, its own values, its own style and rhythm. And that’s not just true for different ethnicities and races, but the queer community, as well. People who are marginalized, especially, have ways of doing normal, everyday things differently than those who are not. They do these things to keep themselves safe, to not draw attention to themselves, to fit in.
So if you decide to put someone in your story that’s somehow different from you in a major way, you’re going to need to do some research. The best thing you can do in this situation is read books written by the people you’re trying to write. If you’re straight and want to write a book with a bisexual female character, read books by bisexual women about bisexual women. Find the blogs these people write and follow them. Talk to them. Ask them if you can talk about their experiences.
What you should not do is get your research from people who are not part of the community. While the information may be valid, it’s the difference between a secondary and a primary source. It’s much better to get it from the people who live it than the people who (maybe) talked to those who lived it.
Writing about people different than you can be intimidating, but don’t let that stop you from doing it. You will get flack no matter how you write these characters, but all you can do is research and do your best to be accurate and respectful.