Hello @kartik,
You could use cross-env to set the port, and it will work on Windows, Linux and Mac.
yarn add -D cross-env
then in package.json the start link could be like this:
"start": "cross-env PORT=3006 react-scripts start",\
Hope it helps!!
To know more about React, We highly recommend to join React Certification course today.
Thank you!!