In my experience, most DMs run relatively low magic settings, where spellcasters of any level are extremely rare. I’m curious though, if that’s the case, how you deal with brazen murder hobo PCs? If your players threaten a village with violence to get their way, do you have high level Fighters as a check back? Are enemy spellcasters just as rare as friendly ones? I understand that high magic settings can get a little wonky when you consider the implications of various higher level spells on the economy, but I worry about players running roughshod over local authorities when even a 5th level Wizard is an astronomical rarity.
You are hitting on a real problem with running a gritty low magic setting, often with 1e AD&D inspired demographics where PC classed individuals are rare. If the PC's are that different from the norm, then they can easily run roughshod over the populace.
So there are a couple of basic approaches that depend on how you want to handle this, and you can mix and match within the same campaign setting.
1) NPC's may not be powerful, but they are ruthless and intelligent. They may not be able to do magic themselves, but they know roughly what magic is capable of, can recognize when it is being employed, and have adopted counter strategies that deal with common problems. Push comes to shove, the just don't fight the PC's fair. They drug PC's, attack PC's when they are asleep, and dispense with norms of justice when it comes to the PC. A PC that throws around their magical prowess finds themselves grappled by a half dozen burly men in the dead of night and if overpowered, their fingers broken with a hammer, their eyes gouged out, and their tongue severed. Good luck casting spells in that situation. PC's that go murder hobo invite the DM to respond to problems in ways that they wouldn't otherwise do. For example, there is usually an unspoken table agreement not to attack sleeping PCs, because coup de grace rules means that the DM just tells the character, "Sorry, your player is dead." Well, if you are going to go murder hobo, you better be really careful where you lay down your head.
2) The populace recognizes that the PCs are basically demigods, and treats them accordingly. This is the opposite approach. If it's clear that the PC's can't be overcome, well just treat the PC's like royalty and ingratiate yourself to them. If the PC's are the BBEG, then the villagers and townsfolk decide the best approach is to accept them as the new Dark Lord and hope their wrath and abuse is mostly visited on their neighbors. We never much cared for people from Overhill in this town anyway. Rather than trying to punish the PC's for acting like they are so much more powerful than the NPC's, just go with it and try to have people respond realistically.
3) High level magic is rare, but low level magic is prevalent. In this model, it's not so much that spellcasters are rare, it's just that ones over 5th level or so are rare - and most of those are in their 50's or 60's and not really fit to be out adventuring. In this world, while high level characters - especially young high level characters - are rare, every decent size town has a variety of 5th and 6th level NPC leaders, who can back themselves up with a couple dozen 2nd and 3rd level minions. If the PC's get too big for their britches early on, they are likely to get smacked down hard using the resources of the townsfolk plus the generally ruthless strategies employed in solution #1. Later on, the PC's are big awesome heroes or villains, and it will naturally make sense for the townsfolk to defer to them as in solution #2. What you'll generally find is this creates a good metagame, because most players that are going to pull a murder hobo lack the patience to wait around until they can actually get away with it, and as such you'll quickly winnow out the problem. This works especially well if you force said players to create new starting characters or otherwise penalize them for losing characters. You end up training the players to adopt at least some sort of sensible functional strategy toward play. One real advantage of going this route, is that you can have pervasive low level counter measures created by the low level spellcasters in the setting. For example, every successful merchant in the setting may own and employ a set of scales which gives off a warning chime when anything magical is placed on it. They use this to routinely check whether an item is illusionary or glamored when conducting transactions, and - unless they are skilled spell-casters themselves - will refuse to do business when magic is involved. PC's that fail this sort of check more than once, may find that word has gotten out and no one will do business with them. They'll also likely find that the law will take an interest in them, and if captured as a suspected abuser of magic will not get much in the way of a fair trial.
And remember, regardless of how you play this, nothing that the PC's try however rare in the setting will be something that hasn't been tried before, and the setting if it is internally consistent will have evolved defenses to protect itself from this sort of thing. Even if high level characters are rare, it doesn't mean that other high level characters won't proactively treat the PC's as a major threat to their current comfortable positions and act to intervene. Even if towns can't muster much in the way of a response, nations or continent spanning religious cults or organizations probably can muster a massive response. If a PC group murders a couple hundred low level commoners somewhere, you can expect every Paladin, Inquisitor, Mercenary, Assassin, and Court Wizard that can be mustered will be out to avenge those deaths.
This topic has come up before in a variety of contexts - are castles sensible in a world with magic is a common variation. It would be worth searching through past threads.