How can I make my camera follow the my players Y axis after a certain amount of height or slower?

I followed Brackeys tutorial but I want the camera to follow my player’s Y axis after his Y axis is > 2 and also make it so that the camera follows my player slower on the Y axis than on the X and Z axis, how do I do that?

Somehow get a reference to the transform of the player game object, and use Mathf.Lerp(transform.position.y, playerTransform.position.y, followRatio); where followRatio determines how closely you follow the player (at 1 you are glued to its y axis, at 0 you don’t follow at all).