The solid propellant contains the oxygen needed to burn as well as the fuel.
For a different reason but explosives contain all their own oxygen too! In that case it’s because you want them to “burn” so fast that there wouldn’t be enough time for enough oxygen to drift in from the air. So you use something like TNT that has -NO3 groups hanging all over it so there’s lots of oxygen readily available pre-mixed throughout the fuel. Boom!
Latest Answers