https://www.reddit.com/r/AskHistorians/comments/hwoyun/many_small_medieval_european_cities_with?sort=confidence This thread from a couple of months ago was on a similar topic and has a really good general answer by /u/sunagainstgold
Obviously more answers are always welcome!