Solo and female travelers manage nearly every country well, but a few strategies consistently raise the comfort level. On transport: many countries offer women-only train cars, waiting areas or bus sections, use them where they exist, especially at rush hour and night. Ride-hailing beats street taxis after dark, with trip-sharing switched on, and some cities have women-driver taxi services worth seeking out. On overnight trains and buses, upper berths and seats near families or other women tend to attract less bother.
On harassment: strategies that work across cultures include confident body language, sunglasses and headphones as engagement shields, a firm loud no that draws public attention when someone persists, and moving toward families, women or shopkeepers, since bystanders in most cultures will intervene once alerted. A wedding ring, real or not, and a mention of a nearby husband deflect a surprising amount of unwanted attention in some regions. Dressing along local norms reduces friction in conservative areas, unfair as that may feel.
Practical extras: choose accommodation in busy central districts and read recent reviews by solo women, arrive in new cities during daylight, share your itinerary with someone, and connect with women-focused travel communities online, whose destination-specific advice is current in ways guidebooks never are.