I do not discount the native help the Spanish benefitted from, and indeed, think it was probably the deciding factor. But the technology they brought was also an important element. One of the advantages of their technology that had nothing to do with being outnumbered was its ability to stun, frighten and freeze the Aztecs, a kind of conquistadors’ shock and awe.
Don’t forget the psychological effect of their mythology that firmly and specifically predicted that strange men would arrive via the eastern ocean to end the Aztec Empire.
That’s the sort of thing that scares the hell out of people.