I have this same problem. I purchased an iPhone 12 second hand and both the front and rear cameras do not work, the flashlight doesn't work, face ID doesn't work, and true tone is on but doesn't work.
Tried restarting the phone
All of the steps in the iPhone 12 camera not working guide on iFixit
Opened the device and cleaned the cameras and face ID module with isopropyl alcohol.
Cleaned the flex cable connectors and checked for an obvious signs of damage to the modules, flex cables or connectors and no obvious issues.
This phone has been dropped since the back glass is cracked albeit not too bad. Front screen shows some very light scratches but nothing that would suggest I need a replacement screen.
Only thing I haven't tried is to test the connector with a multimeter but I don't have board schematics for the iPhone 12.
I suspect this issue is hardware related because the only thing these modules have in common is the logic board itself but if I ever find out what's wrong, I'll make sure to reply. If I haven't replied, I probably gave up.