Teach (one) a lesson American British verb phrase
To counsel one to refrain from engaging in undesirable behavior in the future by exposing him to the negative consequences of his actions
Having my phone left in class really taught me a lesson - I'll never careless.
I intended to teach the newcomer a lesson for failing to follow company's regulations.
Will you stop resorting violence to friend or am I going to teach you a lesson?
The verb "teach" should be conjugated according to its tense
Used to describe a person being more careful after an accident or a bad experience in the past to avoid it happening again.
I drive more carefully after an accident when I was little because a burnt child dreads the fire.