So here's the thing I've noticed. When you say "guns in D&D", most people immediately think of firearms that kill you dead with one shot and can penetrate any medieval armor. They think of how guns are portrayed in media. I've played in other games that have guns, and had players complain that guns are so pathetic in them, because surely they would be far more effective?
Barring that one strange Ravenloft setting, firearms in D&D canonically (AFAIK) get to about the very early 1500's in development (the wheel lock pistol, imported to the Forgotten Realms from Spelljammer).
Now when dealing with firearms of this period, they generate a lot more kinetic energy than most other weapons. So what your armor is made out of really matters. A heat-treated Milanese armour with the mark of a famous armourer might resist a mid-15th century handgun (at least at moderate ranges and angles), an unmarked breastplate of low-carbon steel made for use by infantry might not.
D&D metallurgy is usually quite good, however, as metalworkers can work with fine steel, meteoric iron, mithral, adamantine, and other strange minerals. So there's no real expectation that firearms would be world beaters- and that's before we get into the downsides of firing rates, mechanical failure, reloading under pressure, damp powder, and so on.
And about that firing rate, by the early 19th century, expert riflemen could fire at an astounding three rounds per minute! Compare and contrast that to a 5th level Fighter armed with a longbow, able to fire 20 shots in the same amount of time.
Firearms wouldn't necessarily be world beaters, but a lot of people think they should be.