The smart move is to install the eSIM at home, before you fly. You buy it, you get a QR code, and you scan it once. That saves the eSIM to your phone. It does not start using data yet. It just sits there ready.
While your flight is still on the runway in Mexico, or even in the air with the QR already scanned, you turn the line on in your phone settings and switch on data roaming for it. The moment the plane lands and you take it off airplane mode, you are online. No hunting for the airport WiFi password. No standing in a Telcel kiosk line at Cancun arrivals while your taxi waits.
If you would rather not commit early, you can still install on the plane and turn the plan on only when you reach the terminal. Either way works.