Some Questions about Camerascript

I tried to make a 3rd Person Camera that fits my needs. But it wasent working like it should…thats the code:

using UnityEngine;

public class CameraController : MonoBehaviour
{
    public Transform target;

    public Vector3 offset;
    public float zoomSpeed = 4f;
    public float minZoom = 5f;
    public float maxZoom = 15f;

    public float pitch = 2f;

    public float yawSpeed = 100f;
  
    private float currentZoom = 3f;
    private float currentYaw = 0f;

    private void Update()
    {
        currentZoom -= Input.GetAxis("Mouse ScrollWheel") * zoomSpeed;
        currentZoom = Mathf.Clamp(currentZoom, minZoom, maxZoom);

        if(Input.GetMouseButton(2))
            currentYaw -= Input.GetAxis("Mouse X") * yawSpeed * Time.deltaTime;
    }

        private void LateUpdate()
    {
        transform.position = target.position - offset* currentZoom;
        transform.LookAt(target.position + Vector3.up * pitch);

        transform.RotateAround(target.position, Vector3.up, currentYaw);
    }
}

the problem is the zoomfuntion i would like to have the following Properties in the Camera:

Maxzoom = Position x, 0 y 1.8 Z -2.5
Rotation x 26.5 0 0

minzoom Position x, 0 y 9 Z 9
Rotation x 45 0 0

Second Question, i would like to switch from following to aFreecamera and resetting the Position with a keybind. Should i save the defaultposition in a Vector 3 like:

Vector3 defaultCamPos = (0, 1.8, -2.5)
Vector3 defaultCamRot = (26.5, 0, 0)

and is there a way to change my nickname?!

Not a direct answer to your problem, but have you considered trying Cinemachine for your 3rd person camera needs, if you have trouble adjusting that code? You second questions makes me feel it might help you to check some Unity basics tutorials.

In the most simple form you could probably just read the keypress and do something:

// Listen for a key press in update. Key 'R' in this example.
if (Input.GetKey(KeyCode.R))
{
   ...reset the camera position
}

yeah thanks, my Question wasn’tn about the Keypress. That was obvious to me, i was interested in what to put into the Method.