You need brew installed on your Mac inorder to install powershell. Get brew from https://brew.sh or download it from here https://github.com/Homebrew/brew/releases/tag/4.1.24
On Mac copy the script below and paste in your terminal - it is that simple.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"