Verbal and emotional abuse is never justified Olivia, so if you have regular concerns about specific situations, I would advise you to speak to the Police and report any abuse you may be experiencing. The ultimate advice here is to keep yourself safe and away from harm.
The ideal world is one where difference is accepted and celebrated, though unfortunately some people view being different as a threat. You don't mention if the abuse is physical, so I'm assuming it's a verbal attack. Verbal abuse is a way of attacking or negatively defining another person using words or silence as a weapon. It can take a variety of forms ranging from loud rants to passive-aggressive remarks.
I want you to remember that the abuse has nothing to do with your choice of dress code, sexuality or gender. It's the prejudices and personal experiences of the abuser that inform the abusive attacks on you - it's their stuff that they project onto you. Knowing this can help you understand that difference is yours to own, and should never be muted to conform to perceived societal norms.
If you don't know them, the most instinctive way to respond to a verbal abuser is to attempt to reason with them, however this is rarely effective, and this can put you in a place of harm. I'd suggest that you refuse to engage with a verbal abuser and refrain from trying to reason and argue with them. This will show the abuser that they are not acting rationally, and that you are not going to put up with the behaviour by interacting with the abuse.
Abuse is often about power, and the person who abuses you, uses that power to create fear and to intimidate - they are often looking for a reaction. I mentioned earlier that the main outcome is to keep yourself safe and away from harm. So, don't feel that you have to stand up to an abusive stranger, as this can be a dangerous situation to put yourself in. Maybe notice what they are wearing, and any other identifying features like height, hair colour, along with the location, date and time of day. Make a note of these, as this information will help you to report any abuse, should you contact the Police.
I appreciate that even a strangers comments can have a negative impact on how we feel. Though I'd like you to remember that you choose how important you make this stranger. Don't let them play a leading role in your life - let them be a part of the crowd - forgettable! Sometimes we need to remind ourselves that we are okay. I find writing down 3 positive things about yourself each day can help you refocus on your qualities, and what makes you special, ultimately what makes you unique. Just continue being you Olivia.