I know that "verisimilitude" and "simulationism" can be seen as dirty words in some people's eyes. And you can work your way around those words by dressing it up as "thematic details" and "aesthetic preferences". But I'm just going to come out and say it:
Guns don't belong in medieval style fantasy. It breaks verisimilitude. It's not realistic. Shotguns, .45s, and sniper rifles are not the equivalent of fireballs, crossbow bolts, and longbows. Armor like chainmail is effectively useless against guns. There's a reason guns completely changed what warfare and violence means to humanity.
D&D means having knights whack each other with swords and wizards blasting each other with spells, and real world guns generally don't fit into that. That doesn't mean you can't have laser guns show up for fun sometimes. That doesn't mean you can't have magitech. That doesn't mean magic has to be scientific.