Aw this makes me sad
of course you're within your rights to not want to chat with strangers I suppose
But this is one of the reasons I love living in the north and have found it depressing and miserable when I moved down south for a few years. I really love talking to random people on the bus, in cafes, etc., especially if they're older as I always find they have something interesting to say. Also there's a chance that they're just lonely and I'd hate to ignore someone who felt like that.
Tbf, I'd probably not start a conversation myself unless there was a specific reason to, but I love chatting with random people (and both men and women do it, so I'm confident it's not just an Annoying Man Thing - although yes they exist too but it's not hard to tell the difference usually? Especially if you're as attractive as some of the PP's are proclaiming to be lol, surely you've been flirted with enough times to be able to tell the difference?). I agree with previous posters, just be polite and then find a way to say "well, if was nice speaking to you" with a smile and there you go, conversation ended. Yes sometimes you might get someone who is really going on and not taking a hint - I would just excuse myself to make a phone call normally and just ring my husband or my mum for five minutes.
My husband also seems to attract a lot of random people who want to chat to him, usually older men, so in my experience it's really not a gendered thing. I'm not disputing that men trying to harass women is absolutely a common thing, but I think you can tell the difference between someone being creepy and someone who is just looking for human contact. I also find the creepy harassing men are not stopped by being down south where random conversations aren't the social norm, so I don't think it's the same issue.