Not sure about the new phones, but I switched from an Xr to an Xs last week and I chose to switch phones by migrating the data from my Xr to the Xs. It did ask me if I wanted to set up the eSIM using the info that was in my Xr and I did so. It set up the eSIM perfectly.
However, for various reasons I later reset the Xs to factory settings and decided to set it back up as a "new" phone and this time I had to reinstall the eSIM. Luckily I am with AT&T and the Apple store had AT&T eSIM cards (I picked one up when I purchased the Xs, just in case I needed it). So this was not difficult at all. But they did not have any eSIM cards from the other carriers (such as Verizon or Tmobile).