I have set up email on Yahoo using Apple Mail (iPhone) and Thunderbird (Win). When you log in on the website, you use your normal ID and password. But when you use a third-party email program on a device it requires an “App Password” for verification. It goes in the password box in the email program instead of your normal password.
If you log in your email on the web, in the Security section there will be instructions for generating the App Password (or other method of modern authentication) online and using it in your email program (Outlook in your case) instead of your normal password.
Another modern authentication method is OAuth2.
I don’t know what email provider you use, but you will need whatever modern authentication method they require