If you're using Windows with a Microsoft account, then you need to create a local user. You can remove the Microsoft account afterwards, though make sure you pull everything from its user folder that you want to keep first.
If you're using a local user account and only have a Microsoft account to use Microsoft Store apps, you'll have to remove the Microsoft account from the local account. You can do this by going into Settings -> Accounts -> Email & accounts. Unfortunately this is a all or nothing thing, so you can't for example, tell Windows to not use your Microsoft account on Edge, but allow it for everything else (or at least, I'm not aware of a way to do this)