There are no circumstances where you need to share a verification code with anyone. No one needs access to your account but you.
Messages from unknown numbers asking for money are usually malicious. Confirming with your friend via another communication method before acting.
Try calling the number of a contact you don’t recognize, and if nobody answers the call, send an SMS an asking if it’s them contacting you.
Activate WhatsApp 2-step verification. Once enabled, WhatsApp will send a verification code to your default device when someone tries to log in from another device.
Never share personal information on WhatsApp that you wouldn't want the whole world to know.
Don't click on links or tap save on images or files received from other WhatsApp users.
WhatsApp does include some security features in its settings, and ensuring the app is updated with the latest version.