“Also, in the practice of kindness and generosity, a disciple should be detached. Give for the sake of giving, not for the sake of appearances. Be compassionate because being compassionate is good, not for some external reward. Why? Because practicing kindness and generosity without attachment is the way to reaching the Highest Perfect Wisdom, it is the way to becoming a living Buddha.”
“Subhuti, do you think that you can measure all of space?”
“No, Most Honored One. One cannot possibly measure all of space.”

“Well, Subhuti, the same is true of the merit of the disciple who practices kindness and generosity without any attachment to appearances, without cherishing any idea of form. It is impossible to measure the merit gained by this. Subhuti, my disciples should let their minds absorb and dwell in these teachings.”

The Buddha is telling Subhuti (and us) that what we should do is give for the sake of giving, not to create a good reputation. Generosity is the first of the Six Perfections in Mahayana Buddhism. The perfection of generosity represents more than just giving material things. Obviously, it does represent giving money or items to the needy. It also represents giving your time, things like helping a friend move or spending time comforting someone who is suffering from a loss.
We can also give someone less tangible things, like our love, respect, or patience. We can offer stability, being reliable. If we make plans with someone and keep those plans, we are giving them stability. We can give someone space when they want to be alone, or quiet when they are being bothered by too much noise.
The practice of generosity is beneficial to us. It increases our confidence and self-esteem. It also helps lessen our attachments. If we give material things, it helps us lessen our attachment to material things. Cultivating generosity is helpful in developing love, joy, and compassion.