The right thing to do in your case is to Go in settings then type in search bar security policy see for update or toggle on. If not working the sensors is off, you can turn the sensors on by following this quick & fast tutorial: https://us.community.samsung.com/t5/Samsung-Apps-and-Services/security-policy-prevents-use-of-camera...
Welcome to the community!
Sorry to hear your camera isn't working properly. Do you have a Samsung device by chance? A brief Google search provided these links here and here. I haven't fully gone over the video or link, however, it may provide some useful information.
On the other hand, if your issue is different, could you please elaborate a little more about your device and issue?
Hope this helps 😀