A "password incorrect" message is very generic and essentially useless, because any authentication failure will result in the same "name or password incorrect" message, even if you are 100% certain those credentials are correct.
Sometimes email service providers change the way they implement security protocols... "for your protection" of course. If yours did that you might only find out when your email account credentials are rejected in the manner you describe.
Please read If you can’t send or receive email on your Mac - Apple Support. This might also help: Mail Settings Lookup - Apple Support.
Here are some additional troubleshooting steps to follow.
- Temporarily stop using an email account: (Apple menu) > System Preferences... > Internet Accounts > select your email service, and de-select Mail. Wait a moment or two, then select it again. Repeat for each email account you use, testing after each one.
- If all else fails, temporarily remove that Mail Account from that System Preferences pane, and then add it again.
The last two suggestions are described in greater detail here: Set up Mail with email accounts - Apple Support.
Create a backup if you haven't done that already. To learn how to use Time Machine please read How to use Time Machine to back up or restore your Mac - Apple Support. That doesn't have anything to do with your Mail difficulties; it just goes without saying that you should have a backup.