This happens due to node version, and only v14 seems to work. Though strapi's docs state that v16 and v18 are supported, it also states that you need npm v6 ONLY.
So here's what worked for me:
nvm install 14
nvm install 14
And this will install v14 on your local device - note that it doesn't replace your existing node (maybe you have v18 ?). nvm allows you to use multiple node versions and switch between them as required.
nvm use 14
nvm use 14
It will return the following:
Now using node v14.21.2 (npm v6.14.17)
Now using node v14.21.2 (npm v6.14.17)
now run:
npx create-strapi-app project-name
npx create-strapi-app project-name
It should install and open up localhost for strapi admin in your browser