Go to your User's Library
Scroll down to Containers
Scroll to Mail
Go to System Preferences > Internet Accounts
Uncheck Mail for all but one email account.
Under Window in the Menu bar > Connection Doctor. Do you see two green symbols for the account?
If red, you most likely need to add password under the server settings tab for the account.
In the main Mail window, select to show Mailbox list.
If the account is OK, then add other accounts one by one verifying they are connecting correctly.
If you stored any data under the local "On My Mac" folders these can be imported.
You only want to import the local mailboxes from the last and most current version of Mail. In the past this was named Mailboxes. However if you only see alphanumberic numbering, look inside the folders for Outbox. This is the local "On My Mac" folder (Mailboxes). Select to Import from this folder.
[Note: If you had any POP accounts, you will want to import those as well. This will get the Inbox, Drafts, Sent messages. Any POP account you have added to Mail downloaded the messages from the Inbox. Your local Inbox could contain messages that were removed from the server. Your Sent and Draft messages would only be stored locally in your Pop default folders.]