If You See the Error Message "The QR code reader cannot be used if the camera is unavailable"

Go to Settings > Privacy > Camera, select this app, and allow camera access.