The residents of many of these countries are able to tolerate lower salaries because they have guaranteed free/cheap at POS healthcare, stronger employment and disability protections (yes, often union-won, see Denmark), controlled and low educational expenses, and so on. Not to mention, after you get below top companies, dev earnings are much closer to other white-collar jobs
The average tech salary in Sweden is $50K-$80K from doing some quick Googling. In at major city in the US just doing run of the mill CRUD development a US developer should easily be making $130K-$150K after 3-5 years in the industry.
On the other hand, when I was at $BigTech, interns straight out of college in 2022 were being offered total comp packages of $165K and within 3 years and one promotion were making $240K and that was at Amazon. It’s nowhere near the top paying company.
Right now on my 10th job out of college I’m paying $700 a month pre-tax for family coverage through my company and even that is about the most I’ve ever paid. If I hit one with a low deductible it would be around $1100 a month.
Long Term Disability coverage if added on is around $10 a month.
But the larger point, with the discrepency between comp in the US and Sweden, a US tech worker should be able to build up an emergency fund.