WhatsApp for iOS has added support for a Screen Lock feature. This works by using the Face ID or Touch ID feature on the iPhone to lock the app.
To enjoy this feature, you will need to update your WhatsApp to the latest version and head over to Settings > Account > Privacy and enable Screen Lock. Depending on your phone, you can either use the old Touch ID or the newer Face ID method.
Once this is set up, it will lock the entire app and only people authorized to unlock the phone can now unlock the app.
The WhatsApp update can be downloaded from the App Store.