How to make camera up smooth?

How to make camera up smooth?
My camera will go up instantly,
I wanna make it up smooth.
Any Help?
This is my code

void CameraUp() 
    {
         Vector3 myCamera = transform.position;
         myCamera.y += 0.98f;
         transform.position = myCamera;
         GameObject go = (GameObject)Instantiate(myPrefab, (myCamera - new Vector3(-1.5f, 0, -1f)), Quaternion.identity);
        
    }

Look at Mathf.Lerp or Mathf.MoveTowards, alternately look at some of the free Tween libraries available on the asset store.

Check out the Vector3 static functions in the Scripting Reference section of the documentation.

I try Mathf.Lerp and Mathf.MoveTowards but it still instant,
how to tween it?

There’s also a couple of camera smoothing scripts in the “Scripts” asset package that comes with Unity. Might be of some assistance to you, even as a source of ideas…