Please read If you can’t send or receive email on your Mac - Apple Support.
If that doesn't help, the easiest way to fix it might be to delete the account from System Preferences > Internet Accounts. Then, add it again using that same Preference pane. Those instructions are provided in Set up Mail with email accounts - Apple Support.
If the email messages are stored locally on your Mac, ensure you have a reliable backup prior to making any changes to its file system.
From Mail Help:
Important: If you’re unsure whether messages you want to keep are still on the mail server, move or copy them to a mailbox stored on your Mac (the mailbox appears in the On My Mac section in the Mail sidebar) before you delete the account in Mail.