Is there any way to avoid viewing inside mesh when zooming in close
What you are experiencing sounds like near clipping. In the viewport, press N, go to view, and adjust your start clip distance. If you are experiencing the issue while viewing through a camera, go to the camera's options and adjust its near and far clipping distances. These distances determine the closes and farthest geometry visible through the view/camera.