To unlock your iPhone from its carrier, you'll likely need to contact your carrier directly to cancel your contract.
If your new phone no longer supports SIM cards, or you don't want to use them anymore, you can convert to eSIM instead. I started my career with CNET all the way back in 2005, when the (original) ...
Changing physical SIM cards on your phone is always a fiddly business. First, you have to root for the little SIM tray tool ...