There’s actually a service called jolly rodger that you can forward calls to that uses AI and such to try and do this. It’s pretty cheap, under $20 a year (and also does voicemail and transcribes the calls to a text). I think it does cut down on junk calls, they tend to just hangup.