teach a lesson

teach a lesson — преподать урок, научить, послужить уроком, проучить

Example: This will teach you a lesson that lying is bad! — Это послужит тебе уроком, что обманывать нехорошо.

see aslo
[serves you right]
[that'll teach you]
[отольются кошке мышкины слёзки]
[have it coming]

Related:
extract a lesson from sth to extract a lesson from sth извлечь урок

Example: This is a book about ten Great Ideas. Each chapter is an attempt to savor one idea that has been discovered by several of the world’s civilizations -­ to question it in light of what we now know from scientific research, and to extract from it the lessons that still apply to our modern lives. It is a book about how to construct a life of virtue, happiness, fulfillment, and meaning.

[зарубить себе на носу]