Research. I travel internationally at least twice per year, spending 1-2 weeks in different places off the beaten path/not tourist traps. I always look up basic stuff like “How do I call emergency services (911)?” Do the police shake you down for bribes? If I lose my passport or it gets taken from me, where do I go? If I felt a UTI coming on, I’d absolutely google the cost of healthcare in the city or hit up r/travel to ask advice.
It’s really weird to me that people go to other countries and expect things to be exactly the same as home. Sometimes it’s shitty, sometimes it’s just different. But you won’t know unless you look into it.