Yes. This is old wisdom.
“Beware of practicing your righteousness before other people in order to be seen by them, for then you will have no reward from your Father who is in heaven.
2 “Thus, when you give to the needy, sound no trumpet before you, as the hypocrites do in the synagogues and in the streets, that they may be praised by others. Truly, I say to you, they have received their reward.