I do have this problem with my S20. it happens on Wifi for Whatsapp pictures and videos but wifi messages download ok and all other apps work fine with no download issues.
If I switch off wifi then the downloads work immediately on 4g. I have tried many things. So many in fact that it is difficult to know what fixed it. However this has happened before and been fixed and then a few days later happened again. It may be a download location issue but I use internal storage and have 75% storage space available.
Things I tried: Restarting phone, clearing phone cache, going in to safe mode and then restarting, resetting all phone settings, resetting home router (BT Whole Home mesh wifi), clearing Whatsapp cache, data, uninstalling and reinstalling. Sometimes one or more of these fixes it for a few days. I am reluctant to reset the phone completly as it took me days to set it up in the first place. I may have to do this if it happens again. Right now it's working ok.
I have done extensive searches and can find nothing about problems downloading only on wifi. After doing some of the things above it just starts working again on the same wife. Mobile data downloading has never been a problem.
Hope someone has an idea what may be causing this.