1
Open the Settings App, then go to Accounts - Your Info.
On that page, there should be one of two options available, either the option to 'Switch to a local Account' or the option to 'Stop automatically logging into apps with this account'
Whichever of those options appear, select that option to remove your Microsoft Account from the user profile.
2
If your ultimate goal is to reset Windows completely, then you really do not need to perform those steps, just start the reset and select the option to keep nothing, that will remove your account and all your data from the laptop.
You can also select the option to 'Clean the drives' during the reset, that would securely delete all data from the drive, but if you have a big drive, that process can take a long time.