3blue1brown did an excellent video on this recently, https://youtu.be/KTzGBJPuJwM?si=BSyLqkohWhauX8qQ explains the slowing down
https://youtu.be/Cz4Q4QOuoo8?si=txXHwRi76sH6w0nA explains the bending.
It’s essentially a harmonic oscillation of the material interacting with the light wave, and then you have to bend if you hit something at an angle because one side of the wave slows down before the other side does, so you have to bend to keep the wave the same width.
Latest Answers