This meaning of lesson refers to a thought or teaching we understand from what happens to us. It is often about understanding right from wrong.
The story taught a valuable lesson.
I learned my lesson after failing.
In this context, a lesson often involves practical exercises that help students learn specific skills, like cooking or drawing.
We did a fun lesson in our art class.
She prepared a lesson on cooking techniques.