By going to the link above, you can see the following code:
curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg"
This bash script uses the command wget. However, Mac OS does not come with wget, meaning that this cannot be used.