Do you face the issue all time you use the camera, or is it for a particular scene or object?
Anyway try clearing cache and data of the camera app.
(Settings > Apps > Camera > Storage > Clear Cache > Clear Data. )
》Hope your software is up-to-date.
(Settings > Software update > Download and install. )
》Update all apps from both Playstore and Galaxy store.
》Reset Camera settings to default.
(Camera > ⚙ > Reset settings)
If that too not work,
》Reset app preferences.
(Settings > Apps > three dots on top > Reset app preferences. ) Please note that this will reset your permissions and notifications settings for some apps. But no app data will be lost.
》Perform a forced restart. (Press and hold the power button and volume down button together for 10-15 seconds till phone restarts and shows the Samsung logo.)
(Press and hold the power off button. ( 🔴 Red button on the screen).To exit the safe mode, just restart the device).
Now the problem is only on manual focus for near object (25-100 cm)
and my main use for camera is to this border
Please bring your device to a Samsung Service Center to have it checked out my a technician and help resolve the issue.
Find the nearest service center near you online, or on Samsung.com, or by calling the call center or passing by one of the samsung brand stores.
Wipe your cache partition.
(Simply connect your device to the computer via data cable (or just insert a c-ported headset) > Switch off your device >Press and hold, power button + volume-up button for 4-5 seconds till the phone turn on and boot into the recovery mode.
Use volume keys to navigate to 'wipe cache partition.' Use power key to select and confirm. Then reboot your device. This will not effect any personal data or settings.)