Well the emergence of really cheap voip and nearly free phone numbers means that this kind of spam is on the rise.
Even with T-mobile anti spam we still get messages every week. Here are some notes on how to prevent it.
On the iPhone there are few things to turn on. The first is to go the Settings > Messages and turn on Unknown & Spam > Filter Unknown Senders. What this does is that your message box will now have another tab for unknowns. It relies on youcontact list so it’s not a bad idea to check that tab and add people you know to Contacts
The second thing to do is that if you do get a robocall, they are legally supposed to offer you an option to unsubscribe. I’ve actually not found that this works well, so instead I block the phone number by going to Phone and finding the number. Clicking on the arrow and scrolling all the way down on the contact to “Block this Caller”. You end up with a pretty big list but it works!