This is an issue, and it's something that the carrier had the option to make it easy for consumers or not. It should be the same process as if you lost your phone (and thus the eSIM in it).A huge issue with being esim only is a scenario that I’ve encountered recently.
My iPhone 12 Pro Max had a cracked screen due to a swollen battery so i reset the phone and powered it off for safety, but because I had a physical sim I was able to stick that in a spare SE that I had in a drawer to remain contactable.
Luckily a couple of hours later I had a brand new iPhone 12 Pro Max via Apple Care+ and I was back up and running.
Thing is if you didn’t live near an Apple Store and had to mail the device in how do you stay contactable in the meantime? Or in my case I had to drive down the motorway to the Apple Store, if I hadn’t have had the SE with my SIM card in it what would’ve happened if I broke down and needed to call my recovery company I couldn’t have done it.
Esim is a great idea but until you can switch it between devices as easily as a physical sim it’s going to cause problems when a hardware issue with your iPhone arises.
The idea is this, with the eSIM being digital, and with proper implementation, you should be able to go to the carrier's website or their app, log-in, and then re-activate the eSIM. But of course, the carriers probably will make it harder than it should be, or simply don't support eSIM digitally. I mean with some carriers are still forcing users to get a physical paper for the QR code is a clue that this will be be quite painful transition.