Even though the lens of your eye projects an upside down, 2D image on your retina, you see everything right-side up and in 3D which gives you proper visual orientation and the depth perception you need to catch a ball or safely navigate a set of stairs.

Light from an external source enters through the pupil of the eyes and forms an upside down image on the retina and the retina detects the photons of light and respond by firing neural impulses in the optic nerve and the brain uses those electrical impulses to create a right-side up 3D image..

But why is the incoming image upside down?

Your pupils work like a pinhole camera

A good illustration of the way your eyes take in light and flip the image upside down is a pinhole camera, which is just a box with a small hole on one side and photographic film lying on the other.  Light enters the pinhole camera through the very tiny hole (aperture) and because light moves in a straight line, the rays of light coming from the top and the bottom of the scene intersect at the pinhole and that intersection convergence is what flips the image upside down.

How your brain flips the image right-side up

When light falls on the retina it is transmitted as electrical impulses to the optic nerve and from there to the brain where the upside-down 2D image is processed into a right-side up, 3D image. The incoming electrical impulses are separated and analyzed in different parts of the brain. The separation begins in the retina and continues as visual information flows through all four lobes of the brain where it is analyzed for color, movement, size, distance, and other visual features.

Our 3D depth perception comes from having binocular vision, which means viewing with two eyes that coordinate and work together in a process called convergence. Each eye detects light from a different angle and our brain processes both sources of visual input for depth perception.

People with vision in only one eye often struggle with accurate depth perception; however, in some cases the brain adapts and people with monovision (vision in one eye only) can process the incoming visual signals from only one eye and achieve adequate depth perception.