cPanel comes with composer but not npm. You’ll need to have root access to install npm package so if your not root user then you probably need to find a dedicated server host where you can be the root user or ask your server administrator to install npm if you’re feeling lucky.
Do not use cPanel built in terminal to do a composer install M5, you’ll run out of memory during the installation. Log in via SSH terminal from your computer instead. cPanel does not have ssh enabled by default so you’ll need to contact your server adminstrator to ask to have ssh enabled on your cPanel account or find yourself a dedicated server host.