When visiting locales where the water is not safe to drink, one of your safest options is bottled water.
Some hotels in these locales will offer guests two complimentary bottles of water every day. Multi-day group tours often do the same.
And, in many places, bottled water is easy to find at grocery and corner stores.
The negative side of using bottled water in locales such as these is that, oftentimes, they do not have a recycling infrastructure to prevent plastic waste from wrecking deadly havoc on birds and marine life.
So before your trip, check to see if each of the hotels, hostels, vacation rentals, etc., on your itinerary has recycling bins, whose contents are taken to an actual recycling plant, not a landfill.
If not, then plan ahead to use one or more DIY water purification methods so you can keep your bottled water purchases and consumption to a bare minimum throughout your trip.
And for the few plastic bottles you do use, you can flatten and store them in your checked luggage so you can recycle them when you get home.
NEVER drink water from a bottle with a broken seal because it has likely been filled with tap water by an enterprising local.