On my particular Android phone (Pixel) this is not a great solution because setting Do Not Disturb alters the behavior of other things like Calendar reminders or email alerts. You could make DND not do that, but sometimes I
do want to mute other things. If you're using DND all the time, you essentially lose that feature on your phone.
The best solution I've found is to just go into the Google Dialer app and set the option to not ring on any call suspected to be spam. I still do get spam calls that haven't yet been reported, but it's down to only about 3-4 a month.
Not sure if Samsung phones / other android flavors have a similar feature or not.