Homebrew (or brew) for MacOS is great, but one thing I dislike is how it can upgrade to a major release of say Node.js or Perl. This usually comes with a lot of incompatibility issues because not all modules you’ve got installed work yet or require reinstalling.
To switch to an older version you can use brew link
.
$ brew link --overwrite node@18