Quick check: dial *#06#
Open the Phone app and type *#06# on the dial pad, as if it were a number: the screen appears on its own, without pressing call. If an EID shows up, your phone supports eSIM. But no EID does not mean no eSIM: whether the code does nothing or returns an error notice, or the screen opens fine and only lists IMEI, ICCID and the number (common on many Android phones, especially Xiaomi, Redmi and POCO), that code settles nothing. What settles it is the menu below.
Check on iPhone
Go to Settings > Cellular (or Mobile Data). If you see the option «Add eSIM» or «Add Data Plan», your iPhone supports eSIM.
Check on Android (the menu may vary by brand)
Go to Settings > Connections or Network & internet > SIM manager. On Xiaomi, Redmi and POCO: Settings > SIM cards & mobile networks > SIM card management. If you find any option there that mentions eSIM («Add eSIM», «Activate eSIM», «Add mobile plan», «Scan QR code» or similar), your device supports this technology: the name of the button changes with the brand and the software version, but it is the same path. If there is no option to add or activate an eSIM there, that phone does not support it.