In the battle of Frankenhausen, Germany, 1525, German peasants went up against armored soldiers and the casualties were 5000 peasants dead vs 6 armored soldiers. The technological advantage before modern firearms for formal armies was enormous, even in Europe, even without the help of imported European diseases.
Artillery and cavalry against unarmed peasants is slaughter, not battle.
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.
Numbers like that are almost always the same story. I wasn't familiar with that exact battle [1] but it also matches the pattern. It's not like the peasants actually took on the soldiers, but rather you had some peasants inexplicably leave a town, and organize themselves within a circling of wagons, a 'wagon fort'. That wagon fort was then fully encircled, and 'ambushed' starting with artillery.
The peasants immediately broke and fled, which is where you get the crazy ratios from - fleeing armies are extremely vulnerable and near harmless. Had they fought, they likely would have inflicted far greater casualties on the military forces. However given there were roughly comparable peasant and military forces, the outcome was not in question, so it would have been suicide. Of course so was fleeing.
[1] - https://en.wikipedia.org/wiki/Battle_of_Frankenhausen