Chosen Solution
Hey, I’ve got an iPhone 8 here with a camera that shakes around whenever trying to take a picture. I’m thinking something isn’t secured. Should I just replace the bezel, try to tighten some screws, or replace the whole camera and sensor set up?
This sounds like a parts problem. Replace the camera, there is most likely damage that is causing the focus mechanism to act haywire making the shaking effect.
Replace the whole camera. The fault is within the camera, some magnets or coils became detached with the lens frame, causing the OIS feedback to runaway.
I believe that they had an issue with the iPhone 6 or 6s try putting a small magnet next to the camera and see if it fixes it if it does it needs a new camera. I would like to see what happens before I can give you a better diagnosis.