If you forgot the login details (username and password) used to log in and access your WordPress dashboard, follow these steps to attempt a recovery.
Go to the WordPress login page of your website. Usually, this is either
Click on Lost your password? Link.
Enter either the Username or the Email address associated with your WordPress account.
Click the Get New Password button.
Check your email and click on the link to reset the password.
Set a new password.
Now, you can try to log in again with the previous username and the new password.