Proverb meaning "to give something to somebody who does not recognize its value"
Solution 1:
Depending on the language level you're looking for. From the bible,
to cast pearls before swine
"To give things of value to those who will not understand or appreciate it."
https://en.wiktionary.org/wiki/cast_pearls_before_swine
If you need something as valid but more common
Giving him this gift is simply a waste/ it's wasted on him/her/me
(Cambridge)