City States like Tringapore or Liechtenstein mainly profit from the fact that those are autonomous entities jurisdically, so they can attract companies to settle there as letterbox branch and save a huge amount of taxes and since the population is so little the few % taxation do not seem like much in global comparison, but really matter gdp per capita wise.
You can not reproduce this model on the scale of countries like lets say China or Russia. But, those entities have cities that have first world status and a countryside that has third world status.
Arguably I would say that the US is a special case, since it is not a nation that grew and developed organically.
Also Urbanisation is a thing, in the future all of our children will probably live in megapolis. Even in Germany, which is very contra-polis itself. Even our biggest cities look more like small towns stretched out over a large area. Munich for example even forbids the construction of skyscrapers, a silly thing if you ask me.