Your understanding seems somewhat confused to me. I think
@MoseyingAlong is essentially correct, but his answer to you seems a bit confusing to me as well, so let me add my version of an answer. Maybe it will help you.
You were paid a salary (and maybe bonuses) of, for sake of example, $150,000. You decided to contribute $10,000 to your 401(k) plan, and you participated in some sort of cafeteria plan (perhaps a FSA or something) of $5,000.
In the US, for W-2 wages, there are three kinds of taxes you get to pay, and they are all calculated differently:
1. You have federal income taxes, which would be taxed according to income tax brackets after your standard deduction but only on the amount of your salary after the 401(k) plan and the cafeteria plan. So for income tax purposes, you're only paying taxes on $135,000.
2. Social Security taxes. You pay your half of Social Security taxes (sometimes called OASDI, which is an acronym for the benefits the program provides) at 6.2% of your income up to some maximum taxable amount, which increases from year to year with inflation but in 2019 was $132,900. In this case you would pay that 6.2% on your $150,000 up to that $132,900, so you'd only pay 6.2% of $132,900.
3. Medicare taxes. You pay your half of Medicare taxes at a rate of 1.45% of your full salary. Medicare taxes work like Social Security except there is no maximum taxable amount. So you'd pay 1.45% of the full $150,000.
Because each of these is taxed differently, your W-2 statement reflects your income in three different ways. The boxes 1, 3, and 5 reflect your income according to the varying taxation methods above, and boxes 2, 4, and 6 show the total amount withheld (in the case of box 2) and paid (in the cases of box 4 and 6).
So the $10,000 and $5,000 in my example do come out of your wages (meaning you're paying for them), but they do also reduce your salary that is taxed for federal income tax purposes, so you should see a reduction in your federal taxes because of the choices you made to participate in your employer's benefit programs. This is what is meant by the phrase "pre-tax" benefits.
It is emphatically *not* the case that you get to add the $10,000 and $5,000 on top of your base salary of $150,000 to get a total of $165,000 in compensation, as you seem to be saying in the OP.
Employer contributions to your benefits are not reflected in your W-2 wages, but as noted above they are included in the box 12 codes as additional information.
In the case of an employee who chooses not to participate in the 401(k), then their box 1 wages would be higher by that $10,000, and they would pay more in federal income taxes. Most states piggyback off the federal definition of wages, so they would also pay more in state taxes as well.
...
Here is a decent link on cafeteria plans:
https://www.shrm.org/resourcesandtools/tools-and-samples/toolkits/pages/understanding-section-125-cafeteria-plans.aspxThis explanation may also help:
https://ttlc.intuit.com/community/retirement/discussion/are-contributions-to-401k-plans-subject-to-fica-and-medicare/00/30372