Ohno saidSome of their prosperity is due to their relative under population and abundance of natural resources, so it is not necessarily a fair comparison.
Which natural resources are those? Are you confusing Sweden and Norway? Norway is the one with all the oil.
And actually for a lot of countries to much natural resources is not good. It's called the 'Resource Curse'. It leads to an unbalanced economy, corruption and other problems.
Examples- Russia, Saudi Arabia, most of Africa, etc.
Norway has managed to escape it for the most part because they put virtually all of their profits into a trust fund for when the oil runs out. Rather than spend it.
Having a small population where almost everyone is the same skin color and speaks the same language makes it easier for everyone to get along. If most people getting services looks like you and talks like you then you're less likely to mind when it comes to paying your taxes. I met someone from Karolinska in Stockholm that was talking about how immigration was becoming a big issue in sweden because immigrants and their children now made up 10% of the population.