When you switch phones or replace them with new ones, you should back up all the content on your device, including your Google Messages backup. Then you just need to restore from the Google Messages backup file. All the content will be restored. Here are the instructions for backing up messages in Google Messages.
Backup Google Messages with Google Account
If you have enabled Google account linking with the Google Messages app, the app automatically backs up all text messages.
On your phone, click on Settings then click on Google below. Next, click on Backup or Manage backup. Now you need to select Other device data and then click Confirm below to proceed with the backup.

Using SMS Backup & Restore app
After downloading and installing the SMS Backup & Restore application on your phone, click Get Started to use it. We need to agree to let the application access some permissions displayed on the interface.
Next, click Set Up A Backup to set up a backup on the application. Now you will activate the backup of Messages or Call logs.
![How to backup Google Messages How to backup Google Messages]()
Next, you choose where to store the Google Messages backup file, then choose the folder to save the backup file.
![How to backup Google Messages How to backup Google Messages]()
The application also supports setting up automatic backup mode with the time chosen by the user. You can schedule the backup of Google Messages messages you want.
![How to backup Google Messages How to backup Google Messages]()