Yahoo mail is not recommended for use in Outlook or the Windows 10 mail application unless you use additional authentication. The message indicates that Yahoo servers are refusing your account name and password for some or all services. Of course, Yahoo prefers you use one of their apps, presumably and understandably to generate revenue. This issue has existed since at least 2015.
This link should be helpful:
I can't sync my Yahoo! account with Mail for Windows 10
Google and Apple mail have some issues, too, though Apple has recently improved access through iCloud for Windows, and authentication specifically for non-Apple devices. Google works okay with both Outlook and Windows 10 Mail at the time of this writing.