moralizing:
the action of commenting on issues of right and wrong, typically with an unfounded air of superiority
(Noun)
Example sentences:
Ramayana: When Narada began to speak, Ravana heard attentively because he knew that Narada was not given to moralizing.
Mahabharata: When Yudhisthira spoke moral instructions to Draupadi in the forest, she knew that he was not moralizing; he was simply helping both of them to discern the best possible response to the adversity that had befallen them.
Bhagavad-gita: The Gita is primarily a philosophical book; very few of its passages have a moralizing tone.