accidentally deleted the admin account on my MacBook
The steps you list are for OS older than 10.13. Follow the Apple reset password steps for good results.


How do I recover the administrator or root password on OS X?
https://support.apple.com/en-us/HT201573


Also, I would consider fixing the actual problem. macOS will not let you delete the admin account. You have to have a broken system or run some scripts that could damage anything in addition to the account. Unless you know precisely how you lost your account, it would be better to just back up and reinstall a clean system over top of the existing data and programs.

Same advice when you reset the password, get a backup and be ready to reinstall - perhaps an erase install - your system wasn’t healthy before and getting admin won’t remedy that unhealthy system.