If someone contacted you through WhatsApp that means you were careless with your mobile phone number, just as you are careless with your e-mail that is displayed publicly through your profile. One of the most important steps is not to make such information public, otherwise you give anyone a chance to contact you and try to deceive you in any way.
Actually whatsapp has a very stupid feature. If you join a group, everyone can see and get your number unlike telegram that can hide your number and just show your username.
I think a stranger just got OP's number through a random group he joined.