Some mail servers can be programmed to delete mail from specific users. Check with the mail provider that you're using, and see what sorts of filtering and rules that they offer. Many do offer an immediate blacklist setting.
Within macOS, macOS Mail.app itself can have a rule added that does this, but the Mac will have to be running all the time for the rule to be available and processed and the mail deleted — that can work fine if you're just getting mail on the Mac, but having the Mac filter mail can be a problem if you're also getting mail from the same account on (for instance) an iOS or Android device and the Mac isn't always booted and running.
I've had good success with the add-on SpamSieve tool. That's worked far better than does the in-built spam filtering, and is quite flexible and customizable. Though like using mail rules, the Mac has to be running for the filtering to work.
You're probably not running macOS Server here (this community is intended for folks running macOS Server, and which includes a mail server), but if you are, then it's possible to configure the Postfix mail server to drop the messages for you on the server. If you really are running macOS Server, post up the version and I'll get a better command for you; here's the general blacklist sequence in the Postfix configuration. That'll vary slightly, depending on how old your version of Server.app or OS X Server is...