A reboot can clear temporary sensor or software glitches. A faulty optical image stabilization unit or detached lens can cause shaking. This requires professional repair or camera module replacement.
I fix shaky phone videos using built-in stabilization tools like Google Photos. I open the video, tap Edit, and select Stabilize to automatically reduce shakes. For better results, apps like InShot ...