In more detail
Traditional contributions reduce taxable pay now and are taxed on withdrawal; Roth 401(k) contributions are taxed now and withdrawn tax-free. The yearly contribution limit and rules are set by law and change. Always capture the full employer match first. See How Retirement Savings Work.