Installing stuff: brew vs. official installer - which one should be used? I wonder how programs should be installed on Mac? Via Homebrew or an official installer if there is one?
Let's say I want to install Node.js on my Mac.
The official macOS installation guide offers different alternatives to do so.
So first, I installed it via its official installer file.
I then switched to Homebrew and installed it via brew install node.
So now it seems that I have two installations of Node on my system. When I run the command which node it outputs /usr/local/bin. So clearly the official installation is in favour here (maybe because I installed it first? I don't know). The node installation from Homebrew is in /usr/local/Cellar.
So my questions are:

Should I use Homebrew or the official installer? Why? For me it seems like Homebrew has some advantages over an installer like an easier uninstalling process and a better possibility to update the installed software packages.
How can I switch my system from the usage of the /usr/local/bin Node installation to the /usr/local/Cellar one?
There's a similar question here on Ask Different - What are pros and cons for MacPorts, Fink and Homebrew? - that does a comparison of the different package managers.  It's an excellent read and I encourage you to review it.

Should I use Homebrew or the official installer? Why?

The main difference between using Homebrew and using the installer package is the build time dependencies.  Homebrew (and MacPorts) does an excellent job of managing all of this.  However, with the package, there's no build requirements and the software is ready to go.
Uninstalling is hardly an issue anymore.  Homebrew will manage the uninstall process and handle the run time dependencies trimming them if needed.  However, with free apps like AppCleaner, thoroughly removing an app is not an issue.
So, bottom line is it comes down to your workflow.  If you simply need a utility download the package.  If you utilize more than one and there are shared libraries that you want the ability to manage, go with Homebrew.

How can I switch my system from the usage of the /usr/local/bin Node installation to the /usr/local/Cellar one?

You change your path.
Depending on your shell (~/.bash_profile for Bash and ~/.zprofile for Zsh) you merely add the directory of new utility (see ZSH: .zprofile, .zshrc, .zlogin - What goes where? for more info).  To ensure that it gets selected before the other (native) application, you put it first in the path variable.  For example, the default path is (set by path_helper)
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

In your profile, simply add the line to where your binaries are.  Using your example, to add your path:
PATH=/usr/local/Cellar:$PATH

Your new path will have your Cellar directory prepended to the existing one. Because it's prepended (comes before) your existing path, it will look in that directory first.  See the Homebrew Documentation for full details. I personally use a combination of MacPorts and &quot;official&quot; installers so I use a different directory structure.  YMMV.