From a classical point of view, glass has a higher refractive index n=c/v than air, so light travels slower in glass than in air (essentially n=1 and v=c in air). A kind of explanation is that it is harder to slog through mud and it is harder for the light waves to proceed through the glass as they interact with the material more. Because frequency is constant across the interface, the smaller velocity in glass involves a proportional change in wavelength. On a photon level, the photons are not slowed down, but keep interacting with the atoms of the glass which overall slows down the process of the light passing through the glass, like stopping at rest stops on a trip rather than driving straight through (this is yet another conceptualization rather than a full explanation which has to do with resonances and wave phase velocity). Another way to look at the phenomenon of refraction is to use Fermat's Principle that light minimizes time of travel between point A and B. The fastest way for a lifeguard to go to someone drowning is not in a straight line path between A and B, but to maximize distance running vs. distance swimming. If v running is infinitely faster than swimming, he would run to the point so that he would minimize his time to the victim by swimming normal to the beach (the shortest path in the water). The finite v ratio solution is Snell's Law at the point that he leaves land and enters the water.
I hope that helps. Shorter path in a material is not "faster", it is the result of the minimization of time in the slower material.vs. time spent in the faster material.

JACQUES D.
07/24/23
Saksham J.
Thank you07/25/23
Saksham J.
Thank you for your explanation and telling me that the speed of light doesn't really change, but I am still not clear about why exactly the light bends in glass, how does that help the light? how does that take less time? Are there some visuals you could provide to explain it properly?07/24/23