There’s SpamBlocker app in fdroid I use and love. You can add a regex rule to block numbers. I moved several times, and don’t keep in contact with anyone from that area code anymore, so most spam come in spoofing that area code. I have a rule set to block that area code completely and allow my current actual local area code for doctors and schools and whatnot. Works pretty well.