If you are locked out of the password but your Android phone still has the Gmail account synced (e.g., you can see emails in the Gmail app but don’t know the password to sign in elsewhere), you can change the password directly from the phone:
Head to accounts.google.com/signin/recovery . gmail password recovery tool apk
Keep your device and its security software up to date to protect against malware. If you are locked out of the password