In your admin console, you can enable or disable junk mail filtering in Microsoft 365.
The activation option is located in Configuration => Domain filtering
The activation of the setting requires your authentication to accept the terms of the filtering services.
If you have not already deployed the settings via the PowerShell Script or manually created the ESM SPAM rule in your tenant,
Please refer to the articles: