Hello,
Thank you for posting in Q&A forum.
First of all, you need to know that you cannot delete a Microsoft account from your PC if you do not have another available Microsoft or local account with administrative privileges. So, if the account you are trying to delete is the only account on your computer, then you need to create an account. You can set up a new account by following these steps:
Press Windows key + I to enter Settings.
Open Accounts and select Family & other users.
Click Add someone else to this PC.
If the above steps do not work, you can also add it by following these methods:
1.Press Windows key + R and type netplwiz and click OK.
2.In the newly opened window, click Add
3.Then enter the Microsoft account email address of the person for whom you want to add an account. (This option will create a Microsoft account instead of a local account. If you are sure, follow the instructions).
4.If you choose to create a new local account, select the Sign in without a Microsoft account (not recommended) link.
5.Now enter the username, user password, re-enter the password, password hint and click Next. Follow the on-screen instructions and the account is added successfully.
You can eventually remove the old account from your PC, but remember that deleting it will also delete the user data.
I hope the information above is helpful.
Best regards
Zunhui
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.