Sure, but if you’re a tourist in e.g. Barcelona trying to get a prepaid SIM, odds are the shopkeeper will not ask you for your ID despite being required to.
> Last I traveled the shop required a passport or uploading one to get an eSIM ahead of time.
Sounds like you went to a carrier boutique and not one of the million independent shops.