I have never had this problem. I tend to have NPCs react to magic and spellcasters in ways I think make sense for their culture/society/religion. It varies between setting, but I use the general rule that most magic is seen as a powerful weapon or tool, but there are taboo types (enchantment and necromancy typically). Paladins and Clerics generally think Divine magic is superior to the Arcane, and Wizards and Sorcerers think the opposite. If a shopkeeper were to discover that a mage scammed them with illusion or enchantment magic, they’d be as angry as if they were scammed any other way. People are generally suspicious/hostile towards those with dark power sources (Death Clerics, most Warlocks, some Sorcerers), and treat them how you might expect.
Now, if we’re playing in Eberron, Karnathis/the Blood of Vol won’t care about Necromancy, and Aereni like Deathless necromancy. And I have a setting where Goblinoids love the 3 main types of magic (Arcane, Divine, Primal), but demonize Psionics as being aberrant powers from the Far Realm. My main Psionic faction in the setting views Psionics as superior to the 3 main types of magic. It’s a big issue in the setting and the Yikkan Goblins and Sheiohn Foulen have violently clashed dozens of times over the dispute.
My current character, an Aasimar Divine Soul Sorcerer, is a member of a religion that believes all magic ultimately comes from their god, Ennoea. They think some types of magic are better/more pure than others (Arcane and Divine are better than Primal or fiendish magic). If he were to meet a Druid or Ranger he would look down on them as being worldly pagans that practice impure magic. He’s suspicious of Tieflings because of their fiendish heritage and if he met any Fiend Warlocks he would probably attack them.
So, yeah. I generally consider this stuff when DMing, world building, or playing. I never considered it particularly unique or special that I do this. I kind of thought most DMs consider this in some way.