The best time to buy and install your eSIM is while you are still at home on your own wifi. You buy the plan, scan one QR code, and the eSIM saves itself onto your phone. You do not turn it on yet. It just sits there ready.
Doing this early means you are not standing at the airport trying to load a profile on a weak signal. First check your phone can take an eSIM. Most recent iPhones from the XS onward, plus Google Pixel, Samsung Galaxy S and many other newer models, all work. The phone also needs to be carrier unlocked.
Pick your plan based on how long you are staying. The 1 GB plan for 7 days at $4.06 suits a short two or three day visit with light use. The 3 GB plan for 15 days at $10.08 fits a longer stay or someone who checks maps and posts photos often. The 10 GB plan for 30 days at $26.6 is the one for heavy users or anyone working remotely.