What you revealed in your question caused me to think that at some point during your life a male has done something terrible to you. If that is the case, to feel nervous, even fearful, is natural, so please do not beat yourself up over that.
Yes, there are men out there who are scumbags who will hurt you, but most men are not like that. There are plenty of men want to meet that one special girl whom they can love, protect and make a family with. That was all that I ever wanted, but fate decreed otherwise.
For a woman, the skill is in learning to distinguish the dirtbags from the decent men.
Here is a huge tip from an old male: stay away from the bad boys. During their teens and 20s women are drawn to the bad boys as months to a flame, with a similar result.
Hollyweird and Madison Avenue have subjected you to a lifetime of Pavlovian conditioning that portrays the bad boys as 'fun' and 'exciting'. Look at the male leads since the time of James Dean. Be every clear that bad boys are not (NOT) husband material. Most women do not realise that until they are approaching 30, by which time they have made statements such as "all men are bastards" and "where are all the nice guys". The problem has been their choice of men. The decent men have been there all along, usually in the friend zone where they have been lonely and heartbroken for years.
I would encourage you to take steps to ensure your own physical safety. Find a karate dojo that is near to where you live and become a dedicated student. I have been a student for most of my life and these days I help to teach. None of the women or girls with whom I train would have difficulty defending herself against unwanted advances, even if they were attacked by a street gang. You will become fit, strong, flexible and much more confident, because you will have the knowledge that you can take care of yourself. You will also learn threat perception, which, sadly, is something that young women lack.