If it's a known problem and is occuring in majority of the S10 devices, Please wait for the next update
Accept me as solution by clicking on 3 dots on my comment if I have given you right solution
Dear Samsung Member,
Greetings from Samsung Customer Support!
Please perform the below mentioned steps to resolve the issue:
* Clear camera lens with microfiber cloth or a cleaning wipe. Gently remove the fingerprint, dirt and dust from the camera lens.
* Reset camera settings
Camera > Settings > Reset settings > Reset.
For further assistance, register your concern in Samsung Members Application (Open Samsung Members Application > Get help > Send Feedback > Error report/Ask questions).
Thank you for writing to Samsung.
Samsung Customer Support