Visiting small towns, this is the rule of thumb I have come across. When a city gets to about 1000 people they develop a small general store which is usually a dollar store (family dollar or dollar general), a post office, a library. Smaller than that they usually do not have those things.
When the city gets to 5000 people they have a real grocery store (rather than a few isles at dollar general) and a real department store, possibly a real hardware superstore. As a city grows larger both the market demand for goods/services grows and the tax base grows allowing more opportunities. I haven’t seen many cities with less than 20-30k people that have public transit. And even those, I haven’t seen ones with public transit trains (as well as a bus system) for less than 200k people.
It seems a city generally has to get to 300-500k+ people to have the fan base and tax revenue to support professional sports team(s). As a city grows certain opportunities arise.
Is there an actual formula for what businesses and public institutions develop relative to population or does it vary wildly by city?