Update node version of the custom-resource-apigw-cw-role to Node JS 20 with serverlessFramework 3.x

How to update node version of custom-resource-apigw-cw-role to NodeJS20 with serverless framework 3..x.x
EOL for NodeJs 18 is 04/30/2025

We have updated serverless runtime provider version is 22, which is getting reflected for all lambdas that we create, however version is not changed for lambdas that are automatically created for serverless framework

since the nodeJS18 EOL is imminent, is there any fix or an alternative is available to update the version of auto generated lambda versions to node JS 20?