Fires can't burn in the oxygen-free vacuum of space, but guns can shoot. Modern ammunition contains its own oxidizer, a chemical that will trigger the explosion of gunpowder, and thus the firing of a bullet, wherever you are in the universe. No atmospheric oxygen required.
Source: https://www.livescience.com/18588-shoot-gun-space.html