Buy and install your eSIM at home while you still have your normal internet. You install it once, then leave it switched off until you arrive. That way it costs you nothing while you wait for your flight.
After you buy, you get a QR code. On an iPhone go to Settings, then Cellular, then Add eSIM, and scan the code. On Android open Settings, then Network, then SIMs, and add it the same way. The whole thing takes about two minutes.
Almost every recent phone supports eSIM. iPhones from the XS and newer work. So do recent Google Pixel and Samsung Galaxy phones. If you are not sure, dial *#06# and look for an EID number. If you see one, your phone is ready.