Go to Settings > Cellular/Mobile Data > Add eSIM or Set Up Cellular Service > Use QR Code on your device.
Scan the QR code or take a screenshot (available up to iOS 17.3), tap "Open Image", select the code if available at the bottom of the camera, tap "Next", then tap "Continue" twice and wait a moment. Your eSIM will connect to the network, this may take a few minutes, then tap "Done".
Choose a label for your new eSIM plan.
Select "Primary" for your default SIM, then tap "Continue".
Choose the "Primary" SIM you want to use with iMessage and FaceTime for your Apple ID, then tap "Continue".
Choose the new eSIM plan for cellular data, then tap "Continue".
Go to "Cellular", then select the eSIM just downloaded to your device. Turn on the "Turn On This Line" switch, then select your new eSIM plan for cellular data.
Tap "Network Selection", disable the "Automatic" switch, then manually select the supported network if your eSIM has connected to the carrier label.
Turn on the "Data Roaming" switch for your new eSIM plan.