TL;DR: (1) Maintain a good credit score, (2) Maintain an emergency fund enough for X months, (3) Invest some of your extra money.
On a more serious note, the answer really depends on your situation. I.e. what investment products are accessible to you and how much risk you can tolerate.