In addition to the good tips here and if your company offers it, know the difference between a Roth 401k and regular. In a Roth, you pay taxes going in and the gains are not taxed. In a traditional 401k, the amount you put in is untaxed, but you’re taxed when you take it out. Early on your career, you would hope that the gains outweigh the initial investment.
Disclaimers: I’m not a lawyer, doctor, financial advisor, investment accountant or CPA. Your state, province and/or country may tax differently now or in the future. Past performance is no guarantee of future returns.