How do you figure? If Bob can learn a cantrip he doesn't need to carry around dangerous unstable gunpowder. Early gunpowder was not the clean burning reliable stuff you see in use today either. Early firearms were prone to exploding and mangling the user often enough to be a real risk due to insufficiently developed metallurgy. They didn't just suddenly start with revolutionary war or ww1/ww2+ tech. It's only FR style cultural stasis preventing anyone from learning them or issuing cantrip wands to their troops.Magic makes firearms more likely, not less.
Even if you pick a date & say "this is the year that early/privative firearms were developed in this setting", cantrips, leveled spells, magic items & focus items would advance right alongside them. The revolutionary war or slightly sooner was roughly the point where guns & cannons were developed to really be the bulk of an army's military might rather than them supplementing melee weapons . The phrase "don't fire till you see the white of their eyes" existed because that was about the effective range of early firearms & cantrips are already well beyond that without needing the equivalent of a full round to reload them while being just as good if not better for damage. They were developed to that point because they showed promise as something that could be perfected & improved
There is a pair of modern technologies that nicely demonstrate the problems that firearms would face if we had magic. Photovoltaics was developed in 1849 about 20 years after the dynamo. Two hundred years later you know the tech developed from those today as solar panels & gas powered generators. Most of that ~200 years PV tech was so far behind steam/gas powered generators that it was little more than a quixotic joke or little more than a curiosity to wow kids & we know that because they were still a joke in 1979 when the most famous solar panel install was done. Solar is still ludicrously expensive unless you can amortize the cost over a period of decades. Even with that amortization they are still largely only reaching a point of being competitive thanks to the rising cost of fuel to minimize the gains from technology improvements in generators
You can take the old english longbow training as an example of how much time a civilization might devote to learning offensive cantrips. English males age 16-60 were required to train 2 hours every day. Depending on if you use a standard week or FR's silly 10 day weeks 14-20 hours/week is a significant investment & at least some of that knowledge could be applied to other useful cantrips like mold earth shape water magehand & so on. Not only would spells like firebolt & create bonfire or ray of frost be useful for most of the same uses as a longbow, they would be useful for cooking & preserving food or even to help with heating & cooling in winter/summer. The english didn't suddenly set eyes on their first ever longbow at 16 either, they would have practiced with smaller ones & watched/learned from older relatives much of the prior 16 years