A way can be with a script on the camera.
Assign a target node to a variable to follow and on process do: position = target.position
Another way that does the same but without camera processing, on the node that wants to be followed by the camera, add a RemoteTransform2D node, when that node wants to be followed by the camera do:
$RemoteTrnsform2D.remote_path = your_camera.get_path()
This node will do the translation for you, and some types and axis can be selected to disable some motions temporarily.
I just attached the camera (set in current) to a node that is tracking the object I want to focus on and it copies his position through _physics_process(). The specified object is stored in a variable and I wrote a setter to change it : this way I can choose the tracked object from anywhere.