The true meaning of life is to plant trees under which you never expect to sit.
—Nelson Henderson
The long view is an act of faith. It says that you don't know what the future holds, but you expect to have a place in it. Small actions today can bring future benefits. Start small and build. Find an interest and gain expertise over time. It can provide a new career path or income stream in a fallow season.
Do the kind thing, not because you think you should, but because it makes you feel good. Friendships and mentorships built on kindness are long term investments.
Volunteer when you can to help the aged, assist neighbors with illness or disability, mentor children who've suffered abusive childhoods or who need help to catch up with peers.
These simple actions can have payoffs you may never see. You can save a family or break the patterns of abuse or neglect for future generations.
So, plant your tree. It will take some short term effort, but someday it may feed you or shade you or even give your descendents a reminder that you were here.