It's easier to start conversations but more difficult to end them when you appear femme in my experience. Depends on your intentions, sexuality, if you "pass", and the type of bar of course. So I can't give specific advice, but I am AuDHD, so I definitely get the trouble with social etiquette, but especially when switching gender roles after learning the other side my whole life.
I don't go to bars often, but only go to ones in progressive areas like the city I live in and rarely dive bars or "singles bars". So, it's rare for me to have to deal with aggressive or malicious men that most women have to deal with in bars or anti-trans sentiments. Of course #notallmen, but when you take on the role of a woman in public you of course face the much higher threat against us than male-appearing people do, which is more just a threat of physical violence rather than drugging, rape, torture, and murder that women need to prepare for. Just know to protect your drinks, finish a drink before going to the bathroom or give it to a bartender to put behind the bar, etc. Find out ahead of time if the bar has any other safety tips that they are trained to watch for, especially in "singles bars". They're also sometimes posted in women's restrooms as well. And don't open a tab in case you need to leave in a hurry. Pay for each drink separately. Also, knowing how to shut down a conversion is a good skill. The male role is to approach which sometimes leads to frustration and aggression, and the female role is to fend off such aggression or accept welcome advances. Sucks that the society works that way, but it is what it is. Though, fortunately or unfortunately, for us neurodivergents we often actually give off that shutdown signal by accident anyway as we're conditioned to be more concise with answers. Hard habit to break. Anyway, lots of those kinds of tips on safety are the place to start if you've never been to a bar as a woman. Safety first. And of your area is not safe for trans-women, I can't help as much with that as I avoid bars at all costs in those areas, but not all of us are privileged to live in progressive places.
With that out of the way, really the best way to get people to talk to you in a bar is to appear friendly. Sit at the bar rather than a table, if possible. Arrive earlier if bar space is often full. Be sure to have a smile at all times and make eye contact with people close to you if you feel like you might want to talk to them at some point. Try to avoid closed body language like crossing your arms or hovering over and thus looking down at the bar/your drink (but keep it in view as mentioned in the safety stuff). It can be more difficult if you're taller. If someone starts to sits next to you, look up at them and if they look at you, smile and say hi or even better, use some open ended greetings like "hey, how's it going?". Being a woman and being friendly generally makes people less on guard than as a man or if you aren't smiling. And basic small talk skills like answering questions with answers that give a little information and/or end in a question will keep the conversation going a lot of the time if that's what they're also looking for. And as I mentioned don't use short concise answers that you might be used to giving as ND masking as that doesn't allow for conversation to flow. I mean don't info-dump, at least not at first, but show interest by not using simple positive/negative replies.
Anyway, it's really not that bad and I find I enjoy it way more as a woman. But I enjoy a lot of social things a lot more as a woman. LOL. Be friendly, be safe, talk, smile, stay away from politics or negative subjects, at least at first, and remember that if your fuck up, it's ok, you'll probably never see that person again, especially if you live in a decent sized city, but it's also a reason I avoid dive bars other than the sometimes conservative vibes, since they often have a lot more regulars, and I usually am not looking to become a regular. π
All of this might be regional as well. I live in the US, so if you don't then etiquette might be different, but overall I tried to keep it relatively universal socializing advice. If there's something in particular that you are concerned about, I can try to answer, but again I'm not a big bar person anymore and I was male appearing when I used to visit more, so my knowledge might be hit or miss. Lol