If you are using Outlook, you may want to disable your antivirus or network protocols, which could be blocking Yahoo's ports. Temporarily disabling your firewall and updating your Outlook might solve the problem. To get started, log in to your Yahoo account. Then, click on your profile name. Then, select 'Manage Accounts'. Then, click on the 'Account Info' option and follow the instructions.
For more read - https://onlinegeeks.net/yahoo-mail-not-working-with-ms-outlook/
https://onlinegeeks.net/configure-and-access-yahoo-mail-in-outlook/