Google has this. You can make notification types as silent or normal or priority. Notifications from the same app have groupings of what type of notifications they will send. And you pick which ones you want to be notified about.
Doesn’t this rely on the app developer maintaining the correct labeling of each category? An unethical developer would just mix advertisements into all notification category, while an ethical developer wouldn’t be sending the spurious notifications in the first place.