Aztec warriors were not European peasants though . They were highly skilled and well equipped. They didn't have steel blades (except what they captured from the invaders), but their obsidian "swords" were not that much worse in the hands of a skilled fighter. Plus the European handguns were not that reliable and accurate yet to be all that useful except for showing off. If the first shot missed (assuming it didn't misfire) there was no time for another. And guns need a steady supply of powder and bullets, which Cortez didn't have most of the time since he was also at odds with the governor of Cuba.
There's also plenty of accounts from the early days of Cortez' invasion where the Spaniards had a very hard time against the indigenous warriors even when the Spaniards were not largely outnumbered.
It's not just the blades, it's the steel armor. Aztecs had cotton armor designed to snag the obsidian teeth.
The Aztecs lacked horses and attack dogs. The Spanish by contrast had perfected combat with both. Both proved decisive over and over again. You're correct in asserting that guns weren't decisive - although initially he noise and visual display of firearms were a significant factor in confusing and frightening the Aztecs (especially the common people and subjugated indigenous groups).