The problem is phone number that is short and easy to guess. Imagine replacing them with a longer token that would be generated each time you want to give someone else a way to contact you (e.g. displaying a QR barcode on your phone and letting the other party scan it). Then you'd share a unique identifier with all that parties. Delivery guy can get a token that expires after a while. If someone abuses their ability of contacting someone, the token would get revoked.
I leave the details and implementation as an exercise for the reader ;)
Any call from an unfamiliar number get an automated prompt to enter a specific digit. The digit changes, and of course relies on the caller being able to follow this simple instruction. All of this happens before my phone rings.
Once a call does get through (or even if it hasn't), you can review it on the telco web site, and either whitelist or block each calling number. Those that are whitelisted now get through directly, without the prompt, and then continue on as normal.
No cost to the consumer either for this feature, but it isn't on by default.
And if whitelisting becomes a thing you know the UI is going to say "your order is complete! Please click here to whitelist our number in case we need to reach you."
Not a big deal, and it basically solves phone spam.
But that's the whole (big) deal. The solution is usually the trivial and easy part - getting people to change is the hard part.
Humanity is littered with millions of problems that could be solved if it wasn't for inertia. A solution cannot simply be better or more convenient - it has to be so overwhelmingly better, so much more convenient for people to even consider switching.
And while this solution is better, I don't see your average person caring enough to take the time to make sure they've whitelisted all services they use.
These examples are from my own life, and they happen several times a month. I hardly ever make calls myself, but I do have to be able to receive important calls.
Obviously some use cases can be fixed with text messaging and app, and increaasingly they are, but there are always going to be exceptions. Directing to voicemail is also a solution to some of these, but voicemail acts as a filter: The caller may decide to not bother leaving a message.