I was also suffering from this problem. Yesterday i unable the camera access to paytm and guess what? My M30 camera is working fine after 4 months problem. So guys try this too.
I am also facing same problem for last 2 months after update to android 10 version.
Since December camera was working on and off but for last 10 days it has stopped working completely.
I request samsung to do the needful as soon as possible