Check out MacPorts. It was the original package manager, still going strong, and it supports Macs going all the way back to the Leopard era. It also always used /opt instead of taking over /usr/bin like Homebrew.
I always found it much slower when compared to brew and sometimes would just hang and get stuck when installing something. Plus the lack of casks does make it less of a direct replacement.