Hi KAP1694,
You will need to trick your Mac into thinking that it was never set up before. This will allow you to create a second administrator account that you can use to repair your original account.
- Start up in macOS Recovery.
- If you're asked to authenticate in macOS Recovery, do so to continue. Or, click Forgot All Passwords at the bottom and see if you can sign in with your Apple ID.
- If successful, you should now see a list of utilities. Select Disk Utility and click Continue.
- In Disk Utility, look for an entry named "Macintosh HD", under the Internal header. This entry might be named differently; if it is, take note of that name.
- If an arrow and an icon looking like a stack of sheets appears next to "Macintosh HD", click the arrow to expand the volume group and reveal the volumes inside.
- Select "Macintosh HD" (with a disk icon). If a Mount (not Unmount) button appears, click on it. You might be asked to enter your login password to continue.
- If a "Macintosh HD - Data" or "Data" entry also appears, select it. If a Mount (not Unmount) button appears, click on it. You might be asked to enter your login password to continue.
- When finished, quit Disk Utility.
- You should now return to the list of utilities. At the top of the screen, select Utilities -> Terminal.
- This is the important step. Type the command below and hit Enter (Return), and it will delete a special file that tells your Mac that it has been set up. Once this file is gone, your Mac will act as if it is completely new (but your data will be preserved).
If your startup disk is NOT named "Macintosh HD", replace "Macintosh HD" with the real name of your startup disk:
rm "/Volumes/Macintosh HD/private/var/db/.AppleSetupDone"
Once you've ran the command below, restart your Mac, and log in if prompted. Your Mac will then start the Setup Assistant. Choose not to migrate any data, and you will be allowed to create a new user account. Use a different username and password than your regular account. Then, complete the rest of the Setup Assistant. You will end up inside the new administrator account.
Use the new administrator account to fix any errors you made with your regular account, then make sure that your regular account is an administrator (System Preferences -> Users and Groups). Once you're able to sign back in to your regular account, you can delete the temporary admin you made earlier.