LaTeX is the standard in academic writing, especially for mathematical and natural sciences. LaTeX is open source software and also available for Mac.
To use LaTeX, the MacTeX distribution contains everything you need from the engine up to GUI editors. One way to get MacTeX is to just go to the download site and download the PKG file. The PKG file is an executable installer that installs the software on your Mac.
Another way is to use Homebrew to install the package. It pretty much does the same steps as you would do: download the package and install it. But Homebrew provides some useful meta commands to maintain the dependencies and the version. To install MacTex with Homebrew use the command from Terminal:
brew cask install mactex