Yeah it's a pet peeve of mine when people call any feature a "basic" one.
How is this basic? At a minimum it requires a database of spam numbers, a way to automatically add new ones, probably some way to deprecate numbers that are no longer spammy, a UI, and I'm sure some legal work to ensure they won't break any laws.
Oddly, Apple already has a "database of spam numbers, a way to automatically add new ones", etc., but it only functions within iMessage. Calls from the same numbers don't get detected, and there's no option to flag callers. (You can block them, but not "report as spam.")