As an old hand who was around when homebrew started, I feel obliged to let people know there are alternatives. If you find brew's take-over-your-system-and-youll-thank-me approach off putting, and/or you value stability over the coolness factor, MacPorts is still alive and well ( https://www.macports.org ), and in-fact has basically all the same packages brew does. In 18 years of using MacPorts, it's never messed up…
I used pkgsrc on macOS for a while but ended up going back to Homebrew because it was easier and there were more packages relevant to my needs; I also found packages in pkgsrc wouldn’t play nicely with zsh or bash completion sometimes, I believe this was related to patches specifically required for macOS for these packages. The concept of casks is also very nice, as it means I can manage most packages using a single package manager instead of doing dmg->drag-n-drop installations or mucking around with install/uninstall scripts. Building and maintaining a dumb cask formula is also pretty easy for apps where there isn’t already an available cask.
I haven’t used Macports so couldn’t compare - can Macports install .app applications?