If I’m reading between the lines correctly you are asking if good dead should be a teaching experience or something that should be hidden to stand on it’s own merit (?)
For example let say you save money for a pair of shoes, but instead donate the money to charity. Should we tell our children about it?
For me personally it comes down to trying to teach them and aggrandizing ourselves and the deed. I try to show my children to do things for others, but not to make a show of it. They should not expect praise for doing the right thing. I will give them a quite word of encouragement, but it’s not something we add incentive too. Because of that I don’t make a big show of acts of charity, but instead I try to give them opportunities to be charitable. In the end I want them to be charitable not because of how it reflects on them, but rather how it reflects on Christ.
To the original question, there is nothing wrong with teaching them through your actions as long as it’s not for your own glory.