If you forget [sic] your login password on Mac, click on this link and select the macOS version you use -->
https://support.apple.com/guide/mac-help/if-you-forget-your-login-password-on-mac-mh11627/mac
To learn how to 'Reset your Mac login password', click here and select the appropriate system version document --> https://support.apple.com/en-us/guide/mac-help/reset-your-mac-login-password-mh35902/mac
Click on this link to read what to do "If you forgot your Apple ID" --> https://support.apple.com/HT201354 Note that typically this is an email address you use.
Click on this link to read what to do "If you forgot your Apple ID password" --> https://support.apple.com/HT201487
or go directly to this link --> http://iforgot.apple.com/
Also read about "What to do after [or before] you change your Apple ID email address or password" - https://support.apple.com/HT204071
If you still need help:
Contact Apple for help with Apple ID account security "This article provides country-specific Apple Support contact information for customers seeking help with their Apple ID password or other security-related issues." Click here --> https://support.apple.com/HT204169