In my last campaign, I leaned hard into the "last bastions of civilization" concept. The world was overrun by monsters, excepting 10 powerful city-states. Each city-state had a magical shield that protected the city AND ALL ENVIRONS WITHIN TWO DAYS' WALK. (Each city's shield was powered by something different; Godshome was powered by faith, Magisteria was powered by a siphon from the students and faculty at The Academy, Forgekeep tapped the local volcano, etc.) That provided each city with plenty of safe arable land for food. (The shields were "weakness-permeable", meaning the stronger the attacker, the stronger the shield; kobolds and goblins could get in, but giants and demons could not. Perfect fodder for militia or trainee adventurers.)
Out in the "wilderness", hidden villages still existed, but they were dependent on camouflage - or ongoing bribery - to survive. Some had a ranger or druid supporting them, providing spike growth or martial deterrents to the occasional foe; some of those villages had ties to The Verdant Order, a benevolent (?) druidic organization that felt civilization and nature had finally found an achievable balance, and thus supported both the cities and the hidden villages. (But opposed the creation of new cities, vehemently!)