You should have more than one account set to admin levels.
If you deleted the original admin account that was created when moodle
was first installed via the Moodle interface, in mdl_user table ID 2 row is
probably still there. And the values have been obscured in such a fashion
as to render it's use in Moodle void.
A query of DB mdl_user table for id 2
mysql> select id,username,firstname,lastname,email,password from mdl_user where id=2;
might show something like this:
Column headings ...
| id | username | firstname | lastname | email | password
Data
| 2 | theemailaddressforadminuser.1534812386 | Admin | User | ffc433b7f72fbaed5769cbb5c7dfefed | $2y$10$BPs1o32yWxQDBXd8RgH9ksNLaJ
Moodle UX delete has obscured/changed column info but row ID 2 is still there. The .1534812386 added above is an epoch time stamp of when the account was changed.
To recover one would need to edit values in that row to make user id 2 visiable again in Moodle.
So the example row above would read:
| 2 | admin | Admin | User | adminaddy@somenet.net |
The password, I think, hasn't been altered so one could leave that and other columns alone.
If password has been altered one could cheat ... see password cheat below.
If you have PHPMyAdmin, one could edit row ID 2.
If one had only mysql client (cli) one could also edit/change via update command.
http://www.mysqltutorial.org/php-mysql-update-data/
Password cheat ... find the password for a known account ... like the new admin user you created ...
query for:
mysql> select id,username,firstname,lastname,email,password from mdl_user where username='newadminuser';
You replace 'newadminuser' above with whatever username you used.
Copy the password to a text file on local system ... you will use it in editing row ID 2. You then know that password and should be able to use with user ID 2.
'SoS', Ken