Try to wiping out cache from recovery mode and clear data of camera app and then check if issue still persists then visit service center coz it seems more like camera hardware problem maybe problem with OIS.
Thanks for Being a part of Samsung community. We would like to inform you Kindly follow the steps below to resolve your concern :- 1) Navigate to apps >> Settings >> Apps >> Tap on three dots >> Reset app preferences. 2) Kindly go to camera>>settings>>reset. 3) Please run your device in safe mode. 4) Please do reset your device on factory mode after taking the data backup Via Smart switch.
Be sure to hit ♡ when you find an answer that works for you.