Forgotten the security code for your Nokia phone?
I did. I dug out my old mobile to give my eldest son, and while it would happily accept my old SIM, it wouldn’t accept his new one without the security code.
As long as you can get into the phone, use *#06# to get the IMEI, then feed the number in here to get the “mastercode reset”.
The same site also has facilities for network unlocking phones, but I haven’t needed to try that.
PS. It doesn’t work on a stolen phone, assuming the SIM has been disabled by the owner’s network, as you have to get fully into the phone to get the IMEI and do the reset.