If you have set up a Google Account, it is important to proceed with the following steps before you make a factory reset. This ensures that all private data will be deleted on the device:

  1. Go to Settings
  2. Go to About Phone
  3. Tap seven times on Build Number, this will activate Developer Mode. Don't panic! The next steps are easy, so no need to worry about breaking anything!
  4. Go back to Settings and enter Developer Options
  5. Enable OEM Unlocking
  6. Back to Settings and enter Backup & Reset
  7. Select Factory Data Reset and confirm all of the prompts. This will now completely wipe the device. 

If you don´t enable the OEM-unlocking, the device will always ask you to sign in with the previously synced Google Account after the restart. This would result in the next user having access to your Google Account.