stop jittering movement on camera

for some reason the camera only starts to jitter when I move left or right

void FixedUpdate()
   {
   follow();
   }
   void follow()
   {
   Vector3 playerPos = playerpos.position + offset;

   Vector3 smoothpos = Vector3.Lerp(transform.position,playerPos,smooth*Time.deltaTime);

   camchild.transform.parent = null;
   
   transform.position=smoothpos;
   
  
   }

You should move camera in LateUpdate (or Update, I never remember which is better). Use FixedUpdate only for physics