Abu Hurairah narrated that A man said: "O Messenger of Allah! A man does a deed and conceals it, but when it is discovered that he did it, he is happy about that". He said: " The Messenger of Allah (s.a.w) said: 'He receives two rewards: A reward in its concealment, and a reward in its publicity'."
The Prophet Muhammad ﷺ also taught us that concealing our good deeds can be beneficial because it prevents pride from entering into our hearts which can lead to arrogance and haughtiness. We should remember that all of the rewards come from Allah alone so there is no need to seek recognition or praise from others for doing what is right.