Welcome.
One possibility is hardware failure of some kind, but there are several kinds and it would need further testing before a diagnosis could be made.
Also, does the trouble persist in Safe Mode? If so, you could try another camera app from the Play Store.