Wait and you are just talking about pre-tax contributions, but at least in the 401k plan I'm familiar with, you can contribute more post-tax if you so choose:
The 401(k) contribution limit for 2024 is $23,000 for employee contributions, and $69,000 for the combined employee and employer contributions. If you're age 50 or older, you're eligible for an additional $7,500 in catch-up contributions, raising your employee contribution limit to $30,500. Depending on your plan, you may be able to make post-tax contributions beyond the pretax and Roth contribution limit but less than the combined employee and employer contribution limit to invest even more for retirement. Total contributions cannot exceed your annual compensation at the company that holds your plan.
And as others have said if you are working at one company the whole year they will prevent you from going over the limit.