Gunpowder is an interesting case to suggest. It was already well known around 0AD that saltpeter emitted a dangerous poisonous smoke, already was clearly an interesting element anyone could go mine & put to use hurting people with. It's already overtly a mineral that, like, doesn't conflagrate, but does pretty weird interesting shit when on fire, and lots of folks figured that out.
It seems like by the time 13th century medeival Christiandom rolled around there were two main sources, Aragon & Montpellier. The limited supply indeed did probably greatly slow down the understanding & use.
And indeed, you can make saltpeter... by collecting & refining excrement. Queen Elizabeth paid 300 pounds of gold to the Germans after going to war with Spain & thereby losing access to Spain's natural extract.
The Chinese developing actual black powder is another interesting case. Known for centuries, it wasn't until 904 we had the first recorded use of it for combat. By the 11th century the Song dynasty started greatly controlling access & trade.
In general I think there's probably a ton of primitive chemistry/discover even much earlier ages could have done with access. The actual material being somewhat not easy to scare up is definitely an issue here.
I think the situations you're talking about don't apply very well to the moderm world. The Enlightenment project of building instruments & understanding natural science have built up, and today it would not be hard to figure out how to reproduce black powder. There is definitely more murkiness still with biology, with figuring out how to concot some chemical compounds, or even in material science with figuring out what conditions a certain combination of elements were brought together in. But these historical challenges rely primarily on a darker time in human history to contain the not-so-secret. Enlightenment observation won, it brought us out of that age, it gave us tools to figure things out with.
Im interested in being challenged more, but holy heck AI still feels enormously forbodingly dark & immaterial. Yes, bring able to observe a thing counts. Trying to persuade me that having zero access is OK or normal in the world doesn't sit with me well at all.