When trying to convey the idea that someone learned a valuable lesson, there are many synonyms available that can add variety to your writing. Some alternatives to "taught a lesson" include educated, instructed, enlightened, trained, coached, mentored, guided, shaped, molded, groomed, and developed. Depending on the context, you could also consider alternatives such as demonstrated consequences, modeled behavior, or instilled values. Choosing the appropriate synonym can help to create a more nuanced and vivid picture of the experience and bring greater depth to your writing.