iOS kind of has a spam filter with "Silence Unknown Callers" and "Filter Unknown Senders" but that of course works solely off of someone being in your contacts list. There's also
apps for filtering calls but I haven't worked with any and that requires download/subscribing to something.
Indeed spam calls are more a function of carriers having been slow to adopt call authentication and whatever the scammers feel like targeting today. My mom and I have iPhones with numbers in the same bloc and spam volume will alternate between us. For a while it was consistent that she'd get a scam call from the same number I did about 10 minutes later.