learn your lesson
US /lɜrn jʊər ˈlɛsən/
UK /lɜrn jʊər ˈlɛsən/

1.
aprender a lição, tirar uma lição
to suffer a bad experience and understand from it not to do the same thing again
:
•
After losing all his money, he finally learned his lesson about gambling.
Depois de perder todo o seu dinheiro, ele finalmente aprendeu a lição sobre jogos de azar.
•
If you don't study, you'll fail the exam and learn your lesson the hard way.
Se você não estudar, reprovará no exame e aprenderá a lição da maneira mais difícil.