Most company 401K programs offer a variety of investment options ranging from stocks (riskiest but highest potential for return), bonds/mutual funds (low risk but low return), or blended options (some stocks, some bonds, with risk/reward is based on what % is stock and what % bonds/mf). This all depends upon the employer and the company, their choices, and the company managing the 401K program for them. Yes, some 401K offering are chit, so you need to be mindful of that. Don't invest everything (or a large percentage) of your retirement in a single instrument or even your own company.
If your company plan offers a Roth 401K, most definitely check that out. While contributions made to a Roth 401K are made after-tax, all withdrawals (in retirement) are tax-free AND all investment earnings are tax-free as well. With a traditional (tax-deferred) 401K, contributions and investment earnings are taxable. Also, starting in 2024, there are no RMDs (required minimum distributions) in retirement with Roth 401Ks, while traditional (tax deferred) 401Ks are subject to RMDs (the government forces you to take out money so they can get the tax revenue from it).
Very similar rules affect traditional IRAs vs Roth IRAs.
Nobody can predict the future, but the most important parts of retirement investing are (a) compounding interest and (b) diversifying your assets/investments. Invest early, invest as much as you can, and simply forget about it. When you get paid, pay yourself (invest). When you get a raise, give your 401K/IRA contributions a raise. The closer you get to retirement, the more conservative you want to be with your investments. But if you're more than 5-6-7 years out, there's no reason to not be reasonably aggressive, as the market will have plenty of time to rebound by the time you're ready to retire (historically speaking) while the potential for higher returns is greater.