To avoid this situation in the future, consider these best practices:
On very old devices, after several failed attempts, a "Forgot Pattern" button appears. You can unlock the device by signing in with the primary Google account associated with the phone. universal-unlock-pattern-for-android-download
Set up fingerprint or facial recognition as a secondary access method. To avoid this situation in the future, consider
Keep your Google account details in a secure physical location or a password manager. after several failed attempts