How do I check if my phone is locked to a carrier?

Short answer. On iPhone open Settings > General > About: "No SIM restrictions" next to Carrier Lock means it isn't locked. On Android there is no single standard screen, so ask your carrier. Only the carrier can remove a lock.
SetupUpdated By Brian Muuo3 sources

Why does it matter for a travel eSIM?

Apple: "To use your iPhone with another carrier when traveling internationally, your iPhone cannot be locked to a carrier." A travel eSIM is another carrier.

iPhone

  1. Open Settings.
  2. Tap General, then About.
  3. Read the line next to Carrier Lock. "No SIM restrictions" = not locked. A carrier name = locked to that carrier.

Android

Menus differ by maker and carrier. The reliable route is asking your carrier, which also handles the removal. Samsung notes that a phone must be unlocked for its eSIM transfer feature to work.

How long does removing a lock take?

Apple says it can take the carrier a few days, so do it well before the trip. Apple itself cannot do it.

Related guides

All guides
How to install a travel eSIM on iPhone (iOS 17.4 and later)
Six steps, the exact menu names, and the two settings people miss.
How to install a travel eSIM on Samsung Galaxy and Google Pixel
Menu paths from Samsung and Google, and which models are excluded.
When to install a travel eSIM so you don't lose days
Install and activation are different events. Here is when each provider starts the clock.