Mac mail shows thousands of incoming emails in Activity
If you've just set up Mail, it will attempt to download all the mail that it can find from your mail server. This can't be configured in Mail, only in the mail server/provider's settings.

For gmail - set IMAP sync off for just about all your mailboxes to let one sync start. Once you have a clean sync - then re-enable IMAP sync for the others.

Keep in mind, your Mac will download every mail that google has locally if you don’t prune the list or disable sync for things like archive folders, etc...