I think it's hard to overstate just how categorical a difference in organizational and social doctrine the Spanish were away from the Aztecs. Everything from tactics to logistics train to how the soldiers are motivated. Look at the European wars of colonizing Africa in the 19th century if you want to see how that plays out when they meet in the field.
Like put the Black Prince up against Alexander and even Alexander has a uphill battle. Now take away Alexander's cavalry and give the Black Prince primitive firearms. Unless Alexander gets the jump on him or finds a way to make the meeting of forces otherwise highly unequal, that battle is probably only going one way, and that's for forces of comparable motivation levels.
The numbers disparity only gets you so far ancient empires generally lack the social sophistication to motivate soldiers (especially when recruited from their possessions/allies) to the degree that more modern societies do. Those Aztec conscripts who have been "voluntold" into service by their communities at best are not going to fight to the bloody end. They do not consider themselves citizens of "The Aztec Empire". They are not going to march to their near certain deaths for the benefit of the empire like they're some Red Army machine gun squad piling into a rowboat to cross the Volga in 1941. They can not even have the mental framework for that because a pre-industrial society does not run enough surplus for the state to do the things it must to create that in more than a "kings guard" sized force.
Edit: For a comparison point, the Romans are "a level up" from a lot (but not all) of the societies match up with and they just mop the floor with them. And consequently, anyone who doesn't get subjugated right off the bat winds up looking a lot like the Romans socially and militarily because that's what it takes to compete with them. The Aztecs are competing with borderline stone age societies. They are essentially a bronze age society that's mastered the art of subjugating stone age societies. Spain is half a dozen or so levels up from that. So while the outcome wasn't guaranteed it shouldn't really surprise anyone that the kind of force that Spain can project across an ocean and beat what the Aztecs can field in their own back yard.
I am not sure I am entirely convinced by how you make your point but I think I agree. Here is how I would make the case for it:
The Spaniards had armor and combat formation. Having basic protection and having men march next to you closely must make you quite confident.
On the other hand Aztec fighting style seems to be "Go berserk and attract enemies to you so you can harm them to take them as captive so you can sacrifice them later for prestige". You are actually competing with your fellow warriors to show how brave you are". It seems the culture has optimized for not taking into account fear of death.
That might be a big advantage against other tribes that have the same level of tech than you but haven't bet the farm on militaristic culture but it probably breaks down pretty quickly on armies who rely on "confidence in the collective" rather than individual prestige and have somewhat of a tech edge
> to how the soldiers are motivated
Exaggerating a bit, but I'm fairly sure the Spanish speech was: "if you kill the other guys with your much better weapons, you will reach El Dorado".