Of course you can set your email server to reject every single email that you do not have in a whitelist, but that’s not a feature of the protocol. Plus it’s something you need to manually do (because most people don’t want -or expect that- from email).
People expect Twitter (or similar apps/protocols) to not show them messages other than from people that are explicitly followed.
There is a "Following" tab which is supposed to be just tweets from those you follow (and things they interact with), compared to the "For you" tab which is curated by "the algorithm". I'm pretty certain there has always been a way to filter the timeline down to just people you follow.
If you are in control of your mail server you can block email addresses, even entire domains or IP spaces. I do not understand this statement.