Roth 401k contributions are generally after-tax but still go into your 401k plan and are subject to the same 401k rules, i.e., contribution limits, withdrawal rules, etc. The difference is you are paying taxes at the time you contribute versus when you withdrawal (unless you don't meet the withdrawal requirements of holding the account for at least 5 years and being age 59.5 when you withdrawal).
https://www.betterment.com/resources/traditional-or-roth-401k-decide-with-this-401k-calculator/