[SOLVED] Camera severly jittering

I have a project in which the terrain has lots of trees, lots of detail meshes and post processing applied is on the camera. It is kind of a racing game that I am making. The camera appears to severely jitter on this terrain, however if I import the car prefab, apply the scripts and everything on a completely fresh and plain terrain in another scene, there isn’t even a hint of jitter.

Why does this happen and how do I solve it? Please help!

Car Controller script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CarController : MonoBehaviour
{
    public Rigidbody sphereRB;
    public float speed;
    public float rotateForce;
    public LayerMask groundLayer;
    bool isCarGrounded;
    float moveInput;
    void Start ()
    {
        sphereRB.transform.parent = null;
    }
    void Update ()
    {
        moveInput = Input.GetAxisRaw("Vertical");
        moveInput *= speed;
        Debug.Log(moveInput);
        transform.position = sphereRB.transform.position;
        if (Input.GetAxis("Vertical") != 0 && Input.GetAxis("Horizontal") != 0)
        {
            foreach( TrailRenderer trail in GetComponentsInChildren<TrailRenderer>())
            {
                trail.emitting = true;
            }
        } else
        {
            foreach (TrailRenderer trail in GetComponentsInChildren<TrailRenderer>())
            {
                trail.emitting = false;
            }
        }
    }
    void FixedUpdate ()
    {
        RaycastHit hit;
        isCarGrounded = Physics.Raycast(transform.position, -transform.up, out hit, groundLayer);
        transform.rotation = Quaternion.FromToRotation(transform.up, hit.normal) * transform.rotation;
        if (isCarGrounded)
        {
            sphereRB.transform.Rotate(0f, rotateForce * Input.GetAxis("Horizontal"), 0f);
            transform.Rotate(0f, rotateForce * Input.GetAxis("Horizontal") * Input.GetAxis("Vertical"), 0f);
            sphereRB.AddForce(transform.forward * moveInput, ForceMode.Acceleration);
        }
    }
}

Camera follow script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour
{
    public Transform camPosTarget;
    public Transform camLookTarget;
    void FixedUpdate()
    {
        transform.LookAt(camLookTarget);
        transform.position = Vector3.Lerp(transform.position, camPosTarget.position, 10f * Time.deltaTime);
    }
}

I got it! All I had to do was move this line of code -

transform.position = sphereRB.transform.position

and these lines of code -

sphereRB.transform.Rotate(0f, rotateForce * Input.GetAxis("Horizontal"), 0f);

transform.Rotate(0f, rotateForce * Input.GetAxis("Horizontal") * Input.GetAxis("Vertical"), 0f);

in the CarController script to the FixedUpdate() method.

All the jittering is gone!

However, I don’t quite understand why. I know that FixedUpdate runs more frequently than Update, but when I was seeing the car and sphere in the scene view, by putting those lines of code in FixedUpdate, it seemed like the car was trying to catch up with the sphere while the sphere was moving. In Update, it seems like the car is at the same position as the sphere.