You could've also gogone in the cpanel and to your database, find your user account to super admin and change the password
1.- Login to your cpanel, PhpMyAdmin, (with the user and pass your used when you created the database to install Joomla)
2.- Select your database in PhpMyAdmin Select the prefixofyourtable_users table. Click "Browse" and select "Edit" (the small pen icon) on the user whose password you wish to reset.
3.- You will now see all user data in a form. Under the "password" field, you will see a long list of encrypted letters. Delete these letters, and type in a new password.
4.- BEFORE saving, remember to select "MD5" in the "function" dropdown list. Save your new password and log into the backend of your Joomla site. Remember to reset the password again from the back-end, as the MD5 encryption is much more secure this way.
Restoring your database worked too, but if uyou had any new articles that weren't there when uyou got the backup of your database then uyou lost them.
I wished I would've seen this question before I get around joomla pretty good I had many issues and solve them without too much hassle please don't hesitate to ask me next time u have a problem I'll try my best to help you out 👍 have a good day. I hope this helps anyone else who might encounter this issue