Win 10 in Safe Mode prompts for a password and not a pin number.
If the fault is with the program not restarting in Safe Mode with Networking, then if you can boot up and get in normally, try pressing and holding SHIFT throughout a Restart.
This should take you to the advanced boot options to select Startup Settings then follow the prompts and after the restart, press F5 for Safe Mode with Networking.
You will need to Ethernet connect as Win 10 disables wireless in that mode, but you can manually connect to your SSID if it isn't practical to Ethernet connect.
If you don't have Win 10 install media but access to another computer if you can't get into yours, you can create Win 10 install media after reading the instructions at
https://www.microsoft.com/en-gb/software-download/windows10This will give you the ISO for version 1809.
When you've done that, if using an USB, with the machine switched off, insert the USB and tap F12 as you switch on.
This will give you a one off change of boot order.
Use the cursor keys to select the USB drive and press enter then wait for it to load.
If using a DVD then insert the disk after tapping F12 and select the CD/DVD drive and press enter.
Tap any key when prompted to boot from CD or DVD and you may be presented with an inverse window with Windows Setup [EMS Enabled] highlighted - just press enter and wait for the disk to load.
In both cases, change/confirm the time and currency format - Next - and on the install screen click on Repair your computer.
Click on Troubleshoot and select Command Prompt then enter bcdedit |find "osdevice"
For clarity, that is a Pipe symbol before find and is the uppercase of \
Using your partition letter instead of the x I have used, enter chkdsk x: /f
Note if it reports any KBs in bad sectors - if so, then perform a chkdsk x: /r - again using your partition letter instead of my x
That cmd will take some time if required, but follow the chkdsk with the following cmd, again using your partition letter instead of my exampled X
Note there's a space before each /
sfc /scannow /offbootdir=X:\ /offwindir=X:\Windows
Hopefully that will either report no integrity violations or that it has repaired all files.
Enter exit to close the cmd window, remove the install media and reboot to see if there's any improvement.
If not, boot up with the install media again and this time select the Restore Point option to see if you have any restore points you can use.
Let me know if either of those options resolves.