When booting, press and hold command+s
when the command line terminal appears, enter the commands in the following order:
/sbin/mount -uaw
rm var / db / .applesetupdone
reboot
After the reboot is complete, create a new user and follow the prompts.
After the new user is created, open System Preferences - Users & Groups
Click the original ordinary user, there is a "Allow user to manage this computer" on the right side, tick
Then reboot.
In this way, you can log in to your original system as an administrator, and then delete the newly created administrator account.