Does the frequency of light change as it enters a different substance?

I know that the speed changes.
The question might seem easy, but I have contradicting notes, so I'm confused.

The speed and wavelength changes, but

the frequency remains the same.

Yes, the frequency of light does not change as it enters a different substance. The frequency of light is determined by its source and remains constant regardless of the medium through which it travels. This principle is known as the frequency of light is constant in different media.

However, what does change as light enters a different substance is its speed and wavelength. According to Snell's Law, as light passes from one medium to another, its speed changes. This change in speed causes the light waves to bend and alter their direction of propagation. This phenomenon is known as refraction.

When light enters a denser medium, such as glass or water, its speed decreases, and its wavelength also decreases. The frequency remains constant because it is determined by the source of light. The relationship between the speed, frequency, and wavelength of light can be described by the equation: c = fλ, where c is the speed of light, f is the frequency, and λ is the wavelength.

So, to summarize, the frequency of light remains unchanged as it enters a different substance, but its speed and wavelength do change.