On an iPhone: Settings → General → About → Carrier Lock. It should say "No SIM restrictions".
On Android there is no single reliable screen. Ask whoever sold you the phone, or ask your carrier directly whether it is unlocked for other networks.
A quick test on any phone: put in a SIM card from a different operator, a friend's for example. If the phone asks for an unlock code or says the SIM is not supported, it is locked.
Phones bought on a contract or a payment plan are the ones most often locked. Phones bought outright from the maker usually are not.
Nothing in any phone reports this to an app or a website, so we cannot check it for you. A locked phone refuses a travel eSIM even when everything else is correct.