I think the biggest problem is, that People forget that D&D is a magical setting which offers different solutions to real world problems.
Every (arcane) caster has literally a gun at their fingertips with firebolt or Eldritch Blast, so a logical implementation would be thenatically more like the artillerist artificer subclass Eldritch cannon.
Why would you work with unreliable dangerous Gunpowder (or even invent that in a setting where magic is in abundance) when you can have reliable magic.
So let's get to it:
One Shooter:
Common magic item, magical gun
The most basic of magical guns. It is basically a tube with a magical trigger and some runes etched into it.
Charges: 1
Regenration: Long Rest
Activation: One Action to pull the triggers, uses up the 1 charge.
Effect: Make one range weapon attack (you are proficient with it) (so it uses your stats). Range 15/30ft. Target: One creature. On a hit: 3d4 force damage.
If you are wearing other magical guns on your person that still have charges, roll a d10. On a one, the other guns get triggers by the triggering of this weapon. You take 2d4 force damage per weapon and those weapons loose a charge.
Design intent: That is the One-Off Gun similiar to pirates giving off one shot before using the sabers. It has a high chance of killing a commoner and is a danger to first level characters, so it can be a go to weapon of intimidation for thugs, bandits and pirates. But higher level adventures don't really need to worry about that weapon. It's relatively high damage output and low range can be explained ingame that the enchantment is quite crude and basically just pushing raw magic at somebody.
Two-Shooter:
Uncommon magic item, magical gun
Two of the most basic of magical guns tied together. It is basically two tubes with a magical trigger and some runes etched into it.
Charges: 2
Regenration: Long Rest
Activation: One Action to pull the triggers, using up one or two charges
Effect:
1 charge: Make one range weapon attack (you are proficient with it) (so it uses your stats). Range 15/30ft. Target: One creature. On a hit: 3d4 force damage.
2 charges: every creature in a 15 foot cone in front of you must make a dex saving throw against DC 13 or take 3d4 force damage and be knocked prone. On a save they only take half damage.
If you are wearing other magical guns on your person that still have charges, roll a d6. On a one, the other guns get triggers by the triggering of this weapon. You take 2d4 force damage per weapon and those weapons loose a charge.
Design intent: What happens if we tie two together? More boom of course!
Force thrower
Rare magic item, magical gun
The first reliable and more advanced magical gun.
Charges: 7
Regenration: Long Rest
Activation: One Action to pull the triggers, using up 1 charge.
Effect: Make one range weapon attack (so it uses your stats, counts as a martial weapon). Range 30/60ft. Target: One creature. On a hit: 2d4 force damage.
Design intent: a typical more reliable magical gun. The fire is more focused so the range is longer, it can hold more charges and doesn't just throw all the energy at once, so the damage output is a little lower but can be done more often.
Even more guns ...
And now one would add feats and subclasses that improve on the guns.
Like a fighter subclass- the magical gunslinger. Features: the gunslinger can trigger a magical gun whenever he can make an attack, so extra attack allows him to make more attacks, can recharge the weapons on a short rest, can overload magical guns like the force thrower ect.pp.
So that was just a quick and dirty idea.
Picture were made with Bing Copilot.