The only thing other than a hardware fault could be an app that is using the camera functions. If you have Instagram or some kind of barcode reader app I would try deleting them first. If not, the phone will have to go for repair.
I have no affiliation whatsoever with O2 or any subsidiary companies. Comments posted are entirely of my own opinion.
This is not Customer Service so we are unable to help with account specific issues.Currently using:
Pixel 7a (O2 & Lyca), One Plus 6 (Sfr), iPhone 12 Pro Max (Vodafone)