The two limits are separate.
401k limit is $22.5k, $30k if 50+, any combo of Roth and traditional.
IRA contribution limit is $6.5k, or $7.5k for 50+, also any combo of Roth and traditional.
Just be sure that your change to Roth 401k contributions, instead of traditional, will not push you over the income limit to directly contribute to a Roth IRA. Also, if this is a big change, you might want to run a tax estimate a couple times through the year to make sure your tax withholding is appropriate and you won’t have a surprise tax bill. As a single person with one income, the new W4 tracked my changes from traditional, to traditional + Roth, to all Roth just fine, and did not see any change to my small refund.