It is just like English sayings and phrases, there are Japanese sayings and phrases as well. It is called [kotowaza ことわざ].
馬の耳に念仏 Uma no mimi ni nenbutsu
Few words for you.
Uma – a horse
mimi – an ear
Nenbutsu – Buddhist prayer
A crow imitating a cormorant.
It seemed like I was preaching to the wind while talking to him.
Even if you chant many times to a horse’s ear he does not understand at all.
When someone is not ready to listen to your advise or opinion, it is pointless to tell them.