Oddly enough, mid and high density areas aren’t just for big cities. I know that’s not how North America handles things when it comes to medium-sized cities and small towns but absolutely you can create more efficient towns and living situations even away from large city centers.
The biggest thing that really put it well for me is someone pointing out that frontier towns, or really any town before the car, weren’t spread out just because the population was lower and they had the space. Everything had to be walkable because that’s the only way you could get around; it was human-scaled. There’s no reason we can’t build like that today to create better, stronger cities even when they’re “small”.
Heck where I grew up if you’re lucky enough to live closer to the actual village and not sequestered away in one of the residential-only suburbs you don’t even need a car for your basic life. For commuting yes because we’re not there yet as a society but you can do a lot of stuff in the village as it and the nearby housing was built before the car. Where I live now in Montréal I can happily say that if you dropped my 15min city/borough onto a patch of land by itself you’d need very few modifications to make it a fully functioning city all on its own. I have never felt like people in my mid-density area “live on top of one another”, either, despite literally having upstairs neighbours.
My point is that you don’t need to sprawl and make driving a requirement at any scale. You can make a town of 500 people just as close and connected as a city of 1mil people.