camera target keep angle and y position

I have the script on camera below

using UnityEngine;
 
 public class CameraBehavior : MonoBehaviour {
 
     //// Use this for initialization
     //void Start () {
     
     //}
     
     //// Update is called once per frame
     //void Update () {
     
     //}
 
     public void CameraLookAt(Transform target)
     {
         transform.LookAt(target);
     }
 }

how can I keep the camera’s position.y=2 ?
how can the distance of camera and its target keep the same value?

LookAt changes the rotation and not the position, anyway to change the position you’ll change transform.position
Import the standard camera scripts package in your project (from menu Assets>Import Assets>Scripts) and check at the sample scripts there.