when you want to format or flashed your android phone you can remove your google account first then do the work which u want to do.
If you mistakenly hard reset or flashed your phone then you should add google account which is in your device previous entered but account must be same which is entered in the device.
If you forget google account you can recover your account first then place it in the device.
If you complete forget your google Id and password then you should buy OTG cable and pen drive or memory card. Download frp bypass APK app from google and just copy to the pen drive or memory card. Connect pen drive or memory card to the android device with the help of OTG cable(phone must be power on and it should be ask google account) wait a second then a menu appears you can see bypass APK format file and install it wait to finish installation and open it. Mobile setting open then go to backup and factoryreset (Remained that untick the backup data). Tap on factory reset and tap on delete all user data wait some second or minute until reset will not done when mobile power on you should setup easily without google account. You can do this if the mobile should be support OTG cable.
If this case is in Samsung android mobile phone then you can remove it with Z3X box easily.
Here is some easy ways to remove frp lock.