My website works when I run it on a localhost through npm start. However when deploying the app on netlify the website does not build appropriately. I have tried getting the deploying the app from my github repository along with running a build and deploying it manually, and still no luck.
If you run your npm run build locally, (or check your Netlify build log), you will see a message that explains why this is happening.
It will mention that the site has been produced assuming that it will be hosted in a folder of /portfolio-site/ due to the homepage value you have set in your package.json.
See here:
Since you want to host the site from the root on Netlify, (and not as https://ahmadkanoun.netlify.app/portfolio-site/), you should just delete the entire homepage declaration from your package.json.