What does this quote means?

"The things you do
for yourself are
gone when you are
gone, but the
things you do for
others remain as
your legacy”