Hi there 👋 it might be due to HDR10+ content as you can disable that in camera settings and camera assistant as whatsapp compress photos like let's say Facebook messenger and quality is bad compared to what you took
I had trouble with that a couple of weeks ago. It's ok now though but when it happened I found that if you open WhatsApp and add the pictures from there then it's ok.