The days of being tied to a single carrier with a locked phone for months on end are all but over. Where we once were forced into 24-month contracts with devices that were useless on any other network, nowadays your wireless carrier must unlock your phone if you request it.
Seriously, they do. It’s actually a law. The Unlocking Consumer Choice and Wireless Competition Act makes it so any phone purchased after 2015 will work with any carrier, so your provider can’t keep your phone tied to their network because they feel like it. However, there are some terms and conditions that you’ll need to follow before you can pop another SIM into your phone, and of course they vary by carrier.