I've recently had the interesting time of setting up a new Google Workspace (formerly GSuite) install. Migrating emails between previous service providers is handled by Google's Data Migration Service. This work well (if a little slowly), however when setting up to import from a personal Yahoo Mail account several users report getting an error like this:
Error communicating with the source mail server
Tl;Dr - In the Account Security settings for Yahoo account you are importing you need to create an App Password and use that to log in.
⚠️ Health warning: Technology changes… so this is relevant until Google and/or Yahoo update their interfaces. This means that this will probably be out of date tomorrow.
Behind the scenes Google is using a technology called IMAP to pull emails from one mailbox into the other. Many email providers regard IMAP as a less secure option so are disabling it. This means that when putting in a valid yahoo email address and password into Google's Data Migration Service it is failing - Yahoo hasn't enabled IMAP for that user.