Overview
You can create inbox rules for your Microsoft 365 email account to automatically perform specific actions on messages as they arrive, based on your own customized criteria. For example, you can create a rule to automatically move all mail sent from a particular address to a specific folder or to the trash.
To Manage Rules in Outlook on the web
Sign into Outlook on the web.
...
More information can be found at Use inbox rules in Outlook.com or Outlook on the web.
To Manage Rules in Outlook Desktop Apps
Navigate to the appropriate page for your app.
...