Use bruse to switch versions of things you have installed via homebrew, e.g. bruse php 7.4 or bruse node 10.
GitHub
brew.sh