There seems to be a known issue:
Users get errors 0x800CCC0E & 0x800CCC0F synchronizing Gmail and Yahoo accounts in classic Outlook
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Keeping get error cannot connect gmail with IMAP. Hav e tried all of the sufggested sollution need help
There seems to be a known issue:
Users get errors 0x800CCC0E & 0x800CCC0F synchronizing Gmail and Yahoo accounts in classic Outlook
Follow these steps in order, checking Outlook after each major step.
imap.gmail.com
smtp.gmail.com
If the error persists after all of the above, verify that Outlook 2021 is fully updated, then remove and re‑add the Gmail account using the settings above.
References: