I would recommend you to use LTS node version, as Strapi suggests that.
You can find the available LTS node versions by running the following command: nvm list available then select one version between 18.x.x and 20.x.x and install it. Finally, make sure to use that version by writing this command nvm use vx.x.x where x.x.x is the required version.
Hope that solves your problem!