Here is WhatsApp’s backup instructions→https://faq.whatsapp.com/iphone/chats/how-to-back-up-to-icloud
It’s important to note the difference between iCloud Backup and iCloud sync. While they both include the name “iCloud” they are completely separate functions, and they don’t overlap. To enable iCloud sync for any function go to Settings/[your name]/iCloud and turn on the switches for data you want to sync to iCloud. Data for any switch you turn on will be excluded from an iCloud backup, as it would be redundant.
WhatsApp data can be included in an iCloud backup, or synced to iCloud, but not both. This will be different from the backup described in the WhatsApp article. The reason both iPhone iCloud backup and WhatsApp backup exist is an iCloud backup can only be used to restore a complete iPhone to a previous state; you can’t selectively restore just parts of a backup to the phone. But if you use the backup feature within WhatsApp you CAN restore just the WhatsApp chats, without restoring your entire phone.