Apple Mail is just a mail client , you can host your mail wherever you want to. I currently use G Suite for most of my mail hosting , and Apple mail client to access them. I chose it for the good spam filtering and server-side filters. You can write scripts in Javascript that take actions on your mail, you can even schedule them . I wrote scripts to do things like automatically archive mail over X days old, for example.
Server-side scripting is good since you don't have to leave a computer running at home to filter email.
Anyway, G Suite has a ton of features but the ones I listed are my favorites.