Choose Mailbox > New Smart Mailbox.
Enter a name for the Smart Mailbox.
For example, if you create a Smart Mailbox to organize emails from your soccer group that include an attachment, you could call it Soccer schedules.
Specify the criteria.
In the Mail sidebar, double-click a Smart Mailbox (or select one, then choose Mailbox > Edit Smart Mailbox).
Change, add, or remove conditions, or change other criteria.
Click OK.
Go to the Mail app Create or delete mailboxes in Mail on Mac