Go to this link and copy the following command.
npm install @wordpress/scripts --save-dev
You only need this npm package to compile all JavaScript and SCSS files. This npm package does not support older versions of Node and npm. Please check the node and npm versions before running this command. You must install Node.js 14.0.0 or later and npm 6.14.4 or later on your computer to run the scripts.