1. Request Gmail details
By default, the archiver will try to download everything it can, but if you click the “Deselect” button and check one “Mail” box, only letters and their attached files will be saved.
Click “Next” → “One-time export” → “Create export” and wait. The process, depending on how many emails you have, can take several hours or even days.
When the archive is ready, you will be notified by email.
2. Import the MBOX file into Thunderbird
After the archive creation is complete, you will receive a letter “Data from your Google account is ready for downloading.” Click "Download Data" and download the provided file in MBOX format. If you have a lot of emails, there will be several files.
There are several programs that can open an MBOX file. We'll stick with the free Thunderbird. Download and install it.
When Thunderbird prompts you to set up an account, you can click “Cancel”; you won’t need it. We will only need local folders. Click Blogs and News Feeds → Continue → Done to access them.
Click on the “Local Folders” that appears on the left and click “Options”. Copy the path to the local directory listed in the window.
Now press Win + R on your desktop on Windows or Shift + Cmd + G on macOS and paste the copied address there. The Local Folders folder will open in front of you. Drag the MBOX file into it and reboot Thunderbird.
The import will take some time.
Once it's finished, you'll be able to view a local archive of all your messages ever created in Gmail.
3. Recovering messages from the archive
When you need to transfer messages from MBOX back to Gmail, for example to a new account, open Thunderbird again. Click "Menu" → "Create" → "Set up my mail account."
Enter your details.
And then simply drag the emails you want to recover into your Gmail All Mail folder.
And they will be transferred to the new Google account.