Two quick ways to check in half a minute, and what to watch for with locked phones.
Open the dialler and enter *#06#. If the phone shows an EID number (a long number, 32 digits), it supports eSIM.
On an iPhone, open Settings → Mobile Data and look for “Add eSIM”. On Android, look under Settings → SIM or Network & internet.
Even a phone whose hardware supports eSIM can be locked to a carrier. A locked phone will not accept a foreign eSIM. If you bought it on instalments or with a contract, ask your carrier whether it is unlocked.
Some phones sold in China have no eSIM, even though the same model elsewhere does. If you imported your phone from another country, check it with the code above.
You can find a list of common models on the Compatibility page.