https://answers.msn.com/solution.aspx?solutionid=3b53dd6b-dbac-479a-9401-e8b2b49125e2 tells what to do to reset the password of your Microsoft account.

By the way, we recommend having 2 administrator accounts on your PC/laptop, one for daily use and one for emergencies like this, the last one being a local account, not a Microsoft account. Then you can use the other account if you forgot the password of the first.

And I would recommend to use a password manager like keepass or lastpass to safely store passwords so you can't forget them.