I think this could be a software defect or a hardware one , which could be worse. So to say you need to check both of the cases. My brother had the same issue with his iPhone XS, all the photos were blurred and he could not fix this issue. I think he took his phone to the service, but as I know they wanted to much money for the repairing process, so he was looking for another solution. To be honest, he was trying to buy a new iPhone, but we all know that this in the easiest way as he thought, but not the cheapest one, so his genius plan could not be implemented. I tried to help him and found an app, that could fix his photos, so to say this is a Desktop app www.softorbits.com/unblur-photos/ that can un-blur any photo you need. From my personal experience I can say that you won't lose from quality and from the color palette as well. In other words this was the best way to fix my brother's issue, at least for this moment