An eSIM is a digital SIM: no plastic card needed.
1. Ask your network for an eSIM. They give you a QR code or activate it for you.
2. On the iPhone: Settings, Mobile Data (or Cellular), Add eSIM, then scan the QR code. Stay on Wi-Fi.
3. Name the lines (for example "Work" and "Personal") and choose which one is used for data.
4. New iPhone? Use "Transfer from nearby iPhone" during setup, or Add eSIM, then choose the old phone.
5. Erasing the iPhone asks whether to keep or delete the eSIM. Keep it unless you are selling the phone.
Don't delete an eSIM unless you're sure. Getting a new one usually means a visit to the network's shop.