If you want the camera to smoothly translate to the next target, you’ll need to do some math and find the point X distance behind the new target and smoothly (with a certain speed and acceleration) move towards it every update.
If you want the transition to be instantaneous, what I did was have a separate camera following each target and then just switch between those
Example:
public Camera Current;
void Switch(Camera cam) {
Current.enabled = false;
Current = cam;
Current.enabled = true;
}
And to get a camera of an object you got by a tag, you can call its GetComponentInChildren< Camera >() function.