SF: ~$167k USD p.a. - https://www.builtinsf.com/salaries/dev-engineer/software-eng...
Stockholm: 45k SEK per month = ~$63k USD p.a. - https://www.glassdoor.com/Salaries/stockholm-software-engine...
Taxes are also much higher (especially if your employer has good health insurance coverage in the US, so the added benefits are less). Like I pay an average 40% rate on income plus 25% sales tax, the marginal rate on income (and RSUs, etc.) is 56%!
It's really painful for stuff like housing which is a similar price (and increasing!), or inelastic international goods like electronics, cars, fuel (which is also heavily taxed), etc.
Americans are incredibly lucky - far higher wages, and the freedom to manage your own finances (not forced to pay for irresponsible parents' lifestyle choices through extremely high taxes).