Emergency numbers are country-specific, but a few patterns cover most of the planet and are worth memorizing. 112 is the general emergency number across the entire European Union and works in many other countries too, and crucially it works from any GSM mobile phone in most of the world even without a local SIM, often even without a signal from your own carrier.
Before you travel, spend two minutes finding your destination's numbers on an official government or tourism site and save them in your phone contacts, plus write them on paper in your wallet for the day the phone dies. Add the local tourist police line where one exists, your country's embassy emergency number, and your travel insurer's assistance line.
One more tip: modern smartphones have an emergency SOS feature that dials the correct local number automatically and can share your location; learn how yours triggers before you need it, and also how to avoid triggering it accidentally in your pocket.