Live below your means. You don’t need the latest/greatest iPhone, car, clothes etc.
Invest 10% of your earnings in an S&P 500 index fund. Do these when you are young and get a 7 figure net worth when you’re middle age. If your employer offers a 401k match, take advantage as its free money.
Can confirm personally that this works.