In my case, it was solved by just running the following command.
npm install create-next-app@latest --save
And then, "npx create-next-app@latest" started working.