Sometimes an app can be blocked from using mobile data, even when mobile data works in other apps.
Go to Settings.
Open Apps.
Find WhatsApp on the list.
Make sure Cellular Data is turned on for WhatsApp. (The toggle should be green)
Go to Settings.
Oepn Apps and select See all apps.
Find WhatsApp on the list and tap Mobile data & Wi-Fi.
Make sure Background data is turned on.
If you use Data Saver, make sure Unrestricted data usage is also turned on for WhatsApp. This lets WhatsApp use mobile data even when Data Saver is active.
Go to Settings and tap Connections.
Open Data usage.
Tap Allowed networks for apps and find WhatsApp on the list.
Tap the app name and select Mobile data or Wi-Fi.
If WhatsApp still doesn’t work, check background data settings.
Go to Settings.
Open Apps and find WhatsApp on the list.
Tap Mobile data.
Make sure Allow background data usage is turned on.
If you see Allow data usage while Data saver is on, turn it on too.
After changing the settings, close WhatsApp and open it again. If it still does not connect, restart your phone and try again.