You can transfer your WhatsApp data to a new phone by restoring from Google Drive or a local backup.
In order to successfully restore a Google Drive backup, you need to use the same phone number and Google account used to create the backup.
To restore your backup:
Note: If you install WhatsApp without any prior backups from Google Drive, WhatsApp will automatically restore from your local backup file.
If you want to use a local backup, you'll need to transfer the files to the new phone using a computer, file explorer or SD Card.
/sdcard/WhatsApp/folder, you might see "internal storage" or "main storage" folders.
If you want to restore a local backup that isn't the most recent one, you'll need to do the following:
sdcard/WhatsApp/Databases. If your data isn't stored on the SD card, you might see "internal storage" or "main storage" instead of sdcard.
msgstore.db.crypt12. It's possible that an earlier backup might be on an earlier protocol, such as crypt9 or crypt10. Don't change the number of the crypt extension.