Help with camera follow script with dampening

As the title suggests, I want a camera script that follows the player, in my case, a Spaceship. I have a basic script, but the problem is that I am using Quaternion.LookRotation(), and I think its because of that, it centers my player to the center of the screen, while I want the spaceship to be offset slightly to the bottom of the screen. Also, if I use the rigidbody to move my spaceship, the camera starts stuttering, and I think rigidbody is better than transform.position, as it is better at collision detection, right?

My Code (Camera Follow):

using System;
using UnityEngine;

public class CameraFollow : MonoBehaviour
{
	public Transform target;
	private Transform myTransform;

	public Vector3 offset;

	public float distDampening;
	public float rotDampening;

	private void Awake()
	{
		myTransform = transform;
	}

	private void Update()
	{
		myTransform.position = Vector3.Lerp(myTransform.position, target.position + (target.rotation * offset), Time.deltaTime * distDampening);

		Quaternion desiredRot = Quaternion.LookRotation(target.position - myTransform.position, target.up);
		myTransform.rotation = Quaternion.Slerp(myTransform.rotation, desiredRot, rotDampening * Time.deltaTime);
	}
}

Any help to solve the problems mentioned above is greatly appreciated!!

Hello, i dont understand what do you want to do with this line of code

myTransform.position = Vector3.Lerp(myTransform.position, target.position + (target.rotation * offset), Time.deltaTime * distDampening);

Why are you mixing target.rotation? if you want to offset the position just do target.position + offset rather than multiply the rotation, or is there for some sort of different interactuation?

lets try a complete script, in this case we will copy the rotation of the target

using System;
 using UnityEngine;
 
 public class CameraFollow : MonoBehaviour
 {
     public Transform target;
     private Transform myTransform;
 
     public Vector3 offset;
 
     public float distDampening;
     public float rotDampening;
 
     private void Awake()
     {
         myTransform = transform;
     }
 
     private void Update()
     {
        float PosBuffer = target.position + (myTransform.forward * offset.y + 
             myTransform.right * offset.x - 
             myTransform.up * offset.z);
             myTransform.position = Vector3.Lerp(myTransform.position, PosBuffer, Time.deltaTime * distDampening);
 
         myTransform.rotation = Quaternion.Lerp(myTransform.rotation, target.rotation, rotDampening * Time.deltaTime);
     }
 }

if u want a fixed pointing on center of screen (used with fixed crosshair) u can sync both at 100 units the forward of target

private void Update()
     {
        float PosBuffer = target.position + (myTransform.forward * offset.y + 
             myTransform.right * offset.x - 
             myTransform.up * offset.z);
             myTransform.position = Vector3.Lerp(myTransform.position, PosBuffer, Time.deltaTime * distDampening);
  
         myTransform.LookAt(target.forward*100, target.up);
     }
 }

if u want a wise pointing of different target distances ever at the center (crosshair precise) of screen u will need start using Raycasting

private void Update()
     {
        float PosBuffer = target.position + (myTransform.forward * offset.y + 
             myTransform.right * offset.x - 
             myTransform.up * offset.z);
             myTransform.position = Vector3.Lerp(myTransform.position, PosBuffer, Time.deltaTime * distDampening);
             RaycastHit Hitinfo;
             if (Physics.Raycast (target.position, target.forward, out Hitinfo, 5000f)){
                   myTransform.LookAt(Hitinfo.point, target.up);
             }else
             {
                   //using the last solution
                   myTransform.LookAt(target.forward*100, target.up);}
     }
 }

hope this finally solve all your problems

As for your first problem, just lerp to target.position + offset…set offset in inspector to something like (0, 5, -6) so it follows that far from the player.