Anti-spam legislation doesn’t regulate the technology. It legislates the behavior of the spammers.
This is no different from say, assault, which doesn’t regulate hammers and baseball bats, but makes it illegal to hit people with them without their permission.
Your comment seemed to be claiming that, at least in the example of email spam, only technology (filtering) addresses it, that there is no role for regulation. I was disagreeing with that.
My understanding of phone spam regulation is there is some that legislates technology, namely forbidding completion of connections of spoofed phone numbers.