It’s a fundamental law of physics - every action has an equal and opposite reaction. So if a nozzle expels gasses with a given momentum rearwards, the spacecraft will gain the same momentum in the forward direction. And in the vacuum of space, there is no friction to diminish that effect.
The infinite vacuum of space would vacuum up and instantaneously disperse gasseous molecules faster than its ability to overcome through said nozzle.
Some other person here said that it is ion thrust in space, so looks like I’m right and, of course, the whole idea of rockets operating in a boundless, infinite vacuum makes no sense. There is no fire in a vacuum. No thrust or ignition. No air flow without those molecules sucked up as fast as the skin off your face is ripped away while your innards collapse into a pancake.
The “pressure” I was talking about in a vacuum is the pressure on a tin can to collapse it.