Chosen Solution
So I have a phone here that is not auto focusing. I’m not sure if it would be a camera issue or a sensor issue. When you tap on the screen, it will not try to auto focus like it normally will but you can zoom in and out and looks a little bit fuzzy. The front facing or selfie camera works perfectly.
The motor is damaged on the rear camera so it can’t focus. This happens usually after the phone is dropped numerous times. To fix this it will require getting the rear camera replaced. iPhone 8 Rear Camera Replacement iPhone 8 Rear Camera