If you have forgotten your computer password. So, in this situation follow the below steps.
Go to the Sign-in page and click on the I forgot my PIN
Your Microsoft account will appear. You have to log into it
So, type your Microsoft account password and click on Sign in