Well... this will ironically make me sound like bragging, but whenever I do a good deed or donate to charity, I actually don't tell anyone. (or at least most of the times)
One reason why I do it has to do with the fact that I was taught "don't let your left hand know what your right hand is doing".
I remember one time when I did something and my mother knew about it, and then I told her to not tell anyone else about it.
But well... it can seem kinda "braggy", if someone says stuff like "I donated 10.000$ to a children's hospital" or "I helped an old lady cross the streets" (depends on the context though)
Or when you brag about being a good person, then maybe it ironically makes you sound like a not good person.
Sometimes celebrities (including kpop artists) donate to charities and stuff, and people know about it because of news articles and stuff.
But when you're a celebrity, you often try to be a good influence, which kinda is one of the reasons, why they do charity stuff.
I think some of them also do it to seem like good people.