You can lock the WhatsApp app on your iPhone by following these steps:
Step 1: Launch WhatsApp on your iPhone.
Step 2: Navigate to the Settings section at the bottom right of the interface.
Step 3: Hit Privacy and select Screen Lock.
Step 4: Choose between Face ID / Touch ID and select the time duration.