Apple Mail Mailboxes missing
The only way this can be restored if you have a Time Machine backup or another backup which included mail.


Restore items backed up with Time Machine on Mac


This way all MailBox folders and messages will be restored. 


  If you set up Time Machine to back up files on your Mac, you can use the backups to restore lost mailboxes and email messages.



https://support.apple.com/guide/mail/restore-mailboxes-and-their-content-mail15172/mac