Granted, none of the top universities in my country even makes it to the top 500 in the world, so maybe this isn't a completely fair comparison? Actually, it's expensive by some other EU country standards - public schools in France and Germany, including PSL (ranked 28th in the world) and TUM (ranked 22nd), are free for all EEA applicants, with some nominal yearly registration fees (amounting to $1k in total for a 4-year degree). A more expensive school, like ETH Zurich (rank 7 in the world), is $4500 total for a 4-year degree if you're a Swiss citizen or EEA citizen with a Swiss work permit; it's triple that for an international student.
So yeah, when we say "university is crazy expensive in the USA (and probably UK too)", we're actually talking about the $30-40k numbers you're looking at. $200k and so are almost inconceivable to us.