PF2e tries to make firearms mechanically
different without being clearly, broadly
superior. To give an example, a PF2e jezail is a bit more expensive than an arbalest and harder to find (firearms are mostly produced and used in certain regions of Golarion, not everywhere), with slightly lower range and the same rate of fire (one action to reload). The jezail has a base damage of 1d8 piercing, while the arbalest does 1d10 piercing. The jezail, however, has the Concussive trait , so it gets treated as doing bludgeoning
or piercing damage, whichever is better from the attacker's point of view; it
can be fired one-handed; or, it can be fired two-handed via the
"Fatal Aim d12" trait.
If it is used two-handed, and
if the wielder scores a critical hit with it (which, in PF2e, can happen without a natural 20; success by 10+ suffices, while a n20 will also usually be a critical hit because it shifts by one degree of success)... well, while the arbalest would do 1d8x2 for a critical hit,
fatal would make the jezail do (1d12x2) + d12 on a critical hit. At shorter ranges, a shortbow user might well outdo a wielder of either arbalest or jezail just through rate of fire, unless the latter has some ability to speed up reloading (e.g. Gunslinger feats); and a longbow user can compete at range, but will be hampered at close range, taking a penalty to hit ( which, in turn, means reduced chance of critical hits...).
Likewise, a dueling pistol... base damage 1d4 piercing, which is rather weak; and it has a modest range; but it can be fired one-handed (with another hand required to actually reload it), it has the "concussive" trait which can be handy if you're dealing with enemies that might be resistant to piercing or to bludgeoning but not both; and it has "Fatal d8", so crits end up doing (1d8x2)+1d8. The hand crossbow has significantly better range, and will do slightly more damage when
not scoring critical hits.
They're also given different critical specialization effects (similar to D&D 2024's Weapon Mastery properties, but only triggering on critical hits) with firearms tending to require the target to resist being stunned briefly, while crossbows can inflict persistent bleeding damage, and regular bows pinning targets to a nearby surface until they free themselves.
You could probably port in a lot of properties into D&D, but things like "lower base damage usually, but much higher damage on an excellent hit" -- which relies heavily on PF2e's 10-over/under system in addition to more granular proficiency levels. With 10-over/10-under, you can increase your chances of critical hits by finding ways to debuff the enemy's armor class or buffing your own attack roll. If you
only treated it as "low damage normal hits, very damaging critical hits" without straying from D&D 5E's critical hits mostly being n20-related ( there's, what, critical hits on 5' attacks on paralyzed and unconscious enemies?), then crit-fishing is a bit less practical (what, D&D 2014-era elven accuracy gloomstalker fighting darkvision-dependent enemies in the Underdark?

).