I inserted a new SIM card and now it is asking me for a PIN or unlock code to unlock it
There are several reasons why your device might be locked when you insert a new SIM card.
SIM Card Lock
A SIM card lock protects your SIM from being used on other mobile devices. Follow the below steps to find out how to lock or unlock your SIM card.
If you originally received your device from one network provider and your new SIM card is from a different network, the original network provider may have locked the device to their network.
Samsung does not lock any of its devices to any particular network. You will need to contact the original service provider or retailer to request an unlock code.
Some service providers may allow you to unlock the device for a small charge or for free, whereas others may not allow the device to be unlocked at all.
Some Samsung smartphones work only with SIM cards issued from mobile networks from a certain region. This region should normally be found on your device's packaging when you purchase it.
So for example, if you buy a smartphone in one country, it may not work if you try use it in a different country with a SIM card from that country.
If this happens, you will need to speak to Samsung Customer Services regarding unlocking the phone.