Hi Ssazid,
To clarify, this only happens with the rear camera, or the front one as well? Also, restart your iPhone and test the issue again: Restart your iPhone - Apple Support
Then follow through the tips outlined here:
If the camera isn't working
Remove any case, accessory, or film that might block the camera or that places a magnet near the camera.
Test the camera by trying to take a photo.
If the photo is blurry, clean the front and back camera lenses with a microfiber cloth. If you see dirt or debris inside the lens or if the camera lens appears to be misaligned or blocked, contact Apple Support for help with your iPhone, iPad, or iPod touch.
Restart your iPhone, iPad, or iPod touch.
Test the camera again by taking a photo. If your device has a front and rear camera, check if one or both isn’t working. To switch cameras, tap the rotate button
.
If the issue persists, take a photo while it is happening. Is the photo also blurry or shows signs that the camera was shaking, or does it seem to be only when in the preview in the app?
Should the issue persist, let us know and we'll continue from there.
Cheers!