I just got this after the 17.2.1 update on an XS Max. The user's suggestion of holding down the switch camera button for a few seconds got the front camera working, so thanks for that suggestion!
My torch does not work anymore either.
I tried seeing if other apps were able to use the camera and Adobe Scan had a notification that said "Unable to access the camera." All other apps just show the black camera screen.
This is definitely the most frustrating glitch that Apple has had (after putting up with others that have come and gone over the years). I need my phone camera for work, and given the wide array of Apple devices and iOS's that this has affected, and potentially could affect, I'm going to have to make the switch to Android.