They do not have outer ears. They do in fact have inner ear structures. Snakes can indeed hear loud noises under certain circumstances. If you "shout and scream" at your snake while it was against your body for instance it would most certainly both hear that and also likely react to it.
A vacuum cleaner with either a beater brush or a deep cleaner head cleans your carpet by the dual action of suction and vibration. That's how it loosens the dirt trapped in your carpet so it can be sucked up. Whether that vibration frequency is strong enough to affect your snake if it's across the room, off the floor in it's environment would be impossible to know other than the monitor the snake's reactions when you vacuum close to it.