If you’d prefer to just install the Xcode command line tools (and not the full 12GB Xcode Developer package), first open terminal on your macOS and run "xcode-select --install” and you will be prompted to download and run the CLI tools.
Then run the following commands in the Terminal app, one at a time:
brew reinstall python
brew tap homebrew/cask-versions
Then you can test that it's installed by running:
brew cask install powershell-preview
For updates in the future, you can run:
brew update
brew cask upgrade powershell-preview