Luckily pins and passwords are common issues and 99% of the time they're resolved. From my knowledge you should try these. 1: go to the find my app on your iPhone then go to your computer. there might be a pin there because it said it was in lost mode. the screen should look like a verification code. If you found a pin there try entering it there. If you don't find a pin on your phone, you don't have a iPhone or the pin doesn't work, ETC., ETC., then try my second step. 2: Force shut down your Mac. (press and hold the power button until the screen goes black(if you can't find the power button try pressing and holding the Touch ID.) WARNING!! If your laptop has a HDD (Which is unlikely) then do NOT force shut it down. With some old HDDs just moving it while it's on can cause damage to the disk. So if it has a SSD continue. After force shutting down your Mac Follow through this. If your Mac has an apple silicon chip: Press and hold the power button (or Touch ID) and continue to hold the button down as it starts up it should say "Loading startup options..." When you see your disk and the "options" beside your disk you can let go of the button and use the Left and Right buttons to navigate to options or use the trackpad - if you use the trackpad click on the options (you may need to click again and if you do click on the arrow pointing to options and also sorry about all these ('s ) if you use the keyboard use the Left and Right buttons to navigate to options then when options is highlighted press enter. when you see the options menu use the same method to navigate to Recovery mode this time. it could be "recovery mode" or "recovery" or even install macOS <your macOS name>
go to whichever one of those it could be then when it's highlighted click Enter. if your Mac has a Intel Processor: start up your computer and when you hear the DONGGGG Immediately press and hold Command + R and don't include the + or press one at a time. hold them all of them together at once. After watching the apple with the bar select your preferred language if the screen shows up. if you have FileVault enabled you may have to enter a password of a user on your computer if you have forgot those passwords then navigate to the top bar there should be "erase Mac". WARNING. Before I continue.. I need to say that if you do not have an external Time Machine backup or iCloud Backup you should not continue. If you do not have any important/personal docs or you have a external time machine backup/iCloud Backup then.. Yes you should continue. Click Erase Mac. If you need the password for that too then you whould have to erase with linux off an external drive. You whould need another computer to do that. I'll get to that later though. hopefully you remember your password. or your disk is NOT encrypted with FileVault. when you hopefully get to the screen that has 4 options click disk utility then continue.
Select your disk, it whould be under internal. select the very top disk then erase. when your at the erase menu choose a name then on the second field select APFS then at the third field select GUID Partition Map. Don't use any security options - just click on fastest then click Erase. when it's finished go out then click on install macOS <Your macOS name> then continue. there is another screen after that. click continue. then when the terms and conditions shows up click agree. there might be a pop-up. click agree on that, too. select the disk you just erased a few minutes ago then continue again. now just kick your feet up and wait. the installation will take about an hour then when it's finished continue the setup screen until the screen shows "Restore from Mac or time machine backup." select that then continue until you find your backup. then wait. when that's finished continue the steps then voilà! it should be ready. if those don't work I recommend taking your MacBook Pro to Apple certified technicians. You may need to have your receipt as proof of purchase. Hope I could help!
(This is my best effort to help - Please be nice (: