When installing the app or when opening the camera for the first time, your device will request access to the camera in order to take pictures. If the camera is not working, most likely the permission is not set.
To fix, uninstall the app and reinstall it and then allow the camera access in order to take pictures.