Cost of living is really three separate questions: rent, daily expenses, and lifestyle, and the answers vary hugely by city even within one country. Rent is almost always the biggest line item and the one that differs most; a capital city can easily cost double or triple what a smaller town does for the same size flat. Groceries and transport tend to vary less dramatically.
For students, affordability usually depends on shared housing and cooking at home; that combination makes even expensive countries manageable. Professionals generally find things comfortable if their salary is local-market rate, since wages tend to track living costs. Families feel the pinch most through childcare, schooling, and larger housing needs, so those deserve extra research.
Before moving, build a rough monthly budget using online cost-of-living comparison data and, more importantly, ask people who actually live in your target city on forums like this. Real numbers from residents beat averages every time.