The question is ! How did they get my number?
My number does not have many and only the closest known!
This is the important question in my opinion.
The scam itself isn't that harmful because of how obvious it is - what is worrisome is how scammers are able to target crypto users specifically in their scams via phone or email, which means that they likely have a large database of potential victims alongside some form of contact details.
It is likely that when you signed up to a somewhat shady site, they had asked for verification code on your phone. Or potentially, data leaks of well known exchanges can't be ruled out either, since previously Cryptopia probably had a database leak which resulted in login attempts into user accounts.
Either way, it's important to not only look out for these scams, but make sure that you be careful who and where you share your contact details. Prevention is better than cure, always.