How to make a bullet spread

So I’m making an fps game but I’m having a hard time creating bullet spread. I used brackeys tutorial for shooting but he never showed how to make bullet spread (either that or I’m dumb and didn’t listen). here is my shooting script: (and I don’t have any spread code on it because nothing has worked)

void Shoot()
{

    currentAmmo--;

    RaycastHit hit;
    if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range))
    {

        Debug.Log(hit.transform.name);

        Target target = hit.transform.GetComponent<Target>();
        if (target != null)
        {
            target.TakeDamage(damage);
        }

        if (hit.rigidbody != null)
        {
            hit.rigidbody.AddForce(-hit.normal * impactForce);
        }

        Instantiate(impactEffect, hit.point, Quaternion.LookRotation(hit.normal));
    }
}

I hope someone has an answer.

Something like this will give you bullet spread in a random circle around your aim line

public float maxSpreadDegrees = 5f;

void Shoot(){

    Vector2 spreadDirection = Random.insideUnitCircle.normalized; //Get a random direction for the spread
    Vector3 offsetDirection = new Vector3(fpsCam.transform.right.x * spreadDirection.x, fpsCam.transform.up * spreadDirection.y, 0); //Align direction with fps cam direction

    float offsetMagnitude = Random.Range(0f, maxSpreadAmount); //Get a random offset amount
    offsetMagnitude = Mathf.Tan(offsetMagnitude); //Convert to segment length so we get desired degrees value
    Vector3 bulletTrajectory = fpsCam.transform.forward + (offsetDirection * offsetMagnitude); //Add our offset to our forward vector

    RaycastHit hit;
     if (Physics.Raycast(fpsCam.transform.position, bulletTrajectory, out hit, range))
     {
     }
}