how to change the smooth follow target object of the main camera ?

when I go into collision with an object that destroys the first target object ?

In the same block of code that you Destroy the original target that you collide with (I assume this happens in an OnCollisionEnter or OnTriggerEnter function?) get a reference to the smooth follow script and update the target variable. C# example:

SmoothFollow script = Camera.main.GetComponent<SmoothFollow>(); = newTarget.transform;  // newTarget is a reference to the new game object you want to follow