Rogold Gildenman wrote: Bows are not easy. It takes a lot of practice to become a good archer, and if one is expected to handle a longbow with a heavy draw weight, then we're talking years and years of training.
Yet what about the crossbow, which is roughly as easy to learn as the arquebus and arguably has better range & accuracy than most early firearms?
Guns win.
Most definitely in the long run, though it's interesting to note that at least one observer - I believe it was Benjamin Franklin but one might be mistaken - remarked that a battalion of trained bowmen could still shoot a battalion of musketeers to pieces as late as the 18th Century; one could argue that the advantages are still more logistical than tactical until the debut of the breech-loading rifle finally upped the rate of fire on small arms in the 19th Century.
Cannon, on the other hand, are Bad News no matter what sort of infantry weapon you happen to be equipped with (though it's interesting to wonder if a setting where mages are reasonably available would be bothered to build up the infrastructure associated with Field Artillery).

Franklin wasn't expert in military affairs. But I think you have the source right. It might have been something of a joke on his part-I'd have to look it up.
It would have taken years to train an army of longbowmen and they'd need to be some big beef-fed guys to handle heavy warbows.
It's not about a single engagement. It's about campaigns and wars.
Crossbows were obviously not better than guns as they were fairly quickly displaced by matchlock firearms (at least for military purposes) in real life.
Range and accuracy don't
always matter quite as much as you might think in mass combat. Most men aren't sharpshooters and aren't deployed as such. They are fighting in formations and firing in volleys.
And note to get good long range out of a crossbow you must arc the shot. Sure, the trajectories tend to be pretty flat, but extreme ranges are a different matter.
As far as logistical versus tactical advantages, I'm sure you know the line:
'Amateurs study tactics, professional study logistics.'
Now, do I think an adventurer shouldn't carry a bow or crossbow? Ah, that's quite a different proposition than outfitting an army! An adventurer in D&D is typically a skilled specialist, (at least) a cut above ordinary soldiers and militiamen.
Crossbows and bows are quiet. Guns are
noisy. That may be a consideration.
It may be easy to make to find special bolts and arrows needed to slay certain monsters than to find or cast the equivalent in shot.
Recoverability of projectiles, which I think you mentioned up-thread, could be important, too.
A poacher might prefer a crossbow or bow.
So might an assassin.
And again, is powder produced in large quantities in your setting? If it's not, guns aren't so attractive.