I've raised 4 daughters, I helped with the 2 oldest and as a single parent to the two youngest. Two sons in the middle there also. All of my kids were taught where it was inappropriate to be touched and when. We had code words if someone tried to say I had sent for them.
The two oldest told me that one of their uncles made them"nervous" I had a chat with him, end of problem with him. My kids, boys and girls, were allowed to play outside unwatched and allowed to be a kid like I was.
My daughters will fight you like a man and since reaching adulthood they have all carried a weapon. As has been said 'situational awareness' is a priority. I taught them that if in an uncomfortable area to find an open business, any business,and go in and ask for someone to call the cops.
Nothing anyone can tell you to do will stop a determined rapist or mugger. Except violence toward him.Or her. Just since living here in the 'hood' I've had a couple of females ask for help, not because I am a physically imposing person but because they know I am armed.
Self defense classes taught by qualified instructors are a good idea. Don't look like a victim, keep your head up and pivoting, looking around for trouble. There's so much more that could be added. But a lot has to do with common sense.