brew install node
create a working directory and run
npx create-next-app@latest
in the terminal to automatically install next.js
npm run dev
then click on the link(usually http://localhost:3000/) to see the page layout.