Note: If your email provider requires two-factor authentication, enter the generated passcode they provided instead of your regular password.
On the Change Account window, check the Incoming mail server and Outgoing mail server settings against those from your email provider or the reference article.
YAHOO OUTGOING MAIL SERVER MAC MAIL AUTHENTICATION BOX UPDATE
Update or change your email settings from Mail in Control Panel