Each plan states its own install window, and the plan page shows it. It is usually around 180 days from purchase.
Inside that window the eSIM sits waiting and costs nothing. Outside it, the code can expire unused.
If you are buying a long way ahead of a trip, read that line on the plan before you pay.