The cheap cause worth ruling out first
On many phones the sapphire lens cover cracks while the camera module behind it is fine, and photos come out hazy. Replacing just the cover is far cheaper than a full module.
Shaking and grinding
If you can hear the camera rattling, the optical stabiliser has come loose, usually after a drop. That needs a module replacement — software will not fix it.
