Go to Settings > About Phone > Tap Build Number 7 times. Enter Developer Options and enable USB Debugging .
Fixing this requires specific tools designed to communicate with the Qualcomm diagnostic interface. Here is a deep dive into how these tools work, the best software to use, and how to safely fix a locked device. Understanding the Qualcomm SIM Lock qualcomm sim lock unlock tool fix
Once the progress bar hits 100%, disconnect the phone and reboot it normally. Go to Settings > About Phone > Tap Build Number 7 times
If you aren't trying to change carriers but just want to remove a PIN lock: the best software to use