What you might try, is starting your mac in Safemode. Then test if mail works there. If it does, there's possibly something in your normal login environment interfering with Mail. One thing while you are in Safemode if Mail will start, is to use the Rebuild Mailbox option and also use the Connection Doctor to insure those are not causing the problem. Otherwise you will need to find which application is interfering. The most likely suspect willl be 3rd party optimizers, cleaners, and/or anti-virus apps.
Start up your Mac in safe mode - Apple Support
To rebuild mailboxes:
Click the inbox of each mailbox in the sidebar, then click the upper menu Mailbox, Rebuild.
To use connection Doctor:
Open Mail app, click upper menu, Window. Click on Connection Doctor.