A contribution to a Roth 401(k) has no bearing on your income tax at all. The contribution is made with after-tax money. For income tax purposes, a contribution to a Roth does not affect the amount of income tax you pay.
Let's say that you and I both have a monthly salary of $5000, and we both have the same number of exemptions claimed. You contribute $1000 per month to a Roth 401(k), and I don't contribute anything to a retirement fund. Our employer will withhold the exact same amount of tax from both of our checks. Your Roth 401(k) contribution does not change your taxable income.
Now if I contribute $1000 per month to a traditional 401(k), that reduces my taxable income, and our employer will withhold less tax from my check as a result than he does on yours with your Roth 401(k) contribution. We both put $1000 into our retirement accounts, but my paycheck will be larger than yours.
When an employer withholds tax, they are not technically estimating anything about how much tax you owe. There are formulas that they need to use that determine precisely how much is taken out of your check. It is a function of how big your paycheck is and the information you submitted on your W-4.
If you end up having too little withheld, your employer does not get involved, nor does your 401(k). You submit the required payment to the IRS at tax time.
If it turns out that you had too much withheld, this also does not involve your employer. The IRS sends you a refund at tax time.
A contribution to a traditional 401(k) will ultimately reduce your income tax liability for the year, and a contribution to a Roth 401(k) will not. The contribution limits for the 401(k) is a fixed amount: $19,500 for 2021, possibly more if you are over age 50. Your income/paycheck size/tax withholding have no bearing on how much you can contribute, with one important caveat: Payroll deduction is the only way to contribute to a 401(k), so you can only contribute up to 100% of your paycheck after all of the other things (including federal tax) have been withheld from your check.
When you get a refund from the IRS, it goes into your personal bank account. There is normally no way to make a prior year 401(k) contribution (unlike an IRA). The only way to make a 401(k) contribution is through payroll deduction, and it is only made for the current tax year.