Gunpowder is needed to build rockets – if you have looted an Elytra in an end ship in the End – and to build TNT. Can be handy to remove a mountain in creative mode. The main source for gunpowder are stalkers, but with the risk to be exploded by the stalker.