Problem with couroutines c#

well im having problems to initialize coroutines
in the start function i got this :

void Start()
    {
        rotationSpeed = Random.Range(-maxRotationSpeed, maxRotationSpeed);
        if (materials == null)
        {
            InitializeMaterials();
        }
        gameObject.AddComponent<MeshFilter>().mesh = meshes[Random.Range(0, meshes.Length)]; ;
        gameObject.AddComponent<MeshRenderer>().material = materials[depth, Random.Range(0, 2)];
        //GetComponent<MeshRenderer>().material.color = Color.Lerp(Color.white, Color.blue, (float)depth / maxDepth);

        if (depth < maxDepth && randomSpawn)
        {
            StartCoroutine(CreateChildrenRandom());
        }

        if (depth < maxDepth && randomSpawn == false)
        {
            StartCoroutine(CreateChildren());
        }
        
        transform.Rotate(Random.Range(-maxTwist, maxTwist), 0f, 0f);
    }

what im trying to do is to validate 1 of the ifs above but for an unknown reason it tries to start both or just the createChildren courutine

private IEnumerator CreateChildrenRandom()
    {
        if (Random.value < spawnProbability)
        {
            for (int i = 0; i < childDirections.Length; i++)
            {
                yield return new WaitForSeconds(Random.Range(0.1f, 0.5f));
                new GameObject("Fractal Child").AddComponent<Fractal>().Initialize(this, i);
            }
        }
        Debug.Log("make1");
    }

    private IEnumerator CreateChildren()
    {
        for (int i = 0; i < childDirections.Length; i++)
        {
            yield return new WaitForSeconds(Random.Range(0.1f, 0.5f));
            new GameObject("Fractal Child").AddComponent<Fractal>().Initialize(this, i);
        }
        Debug.Log("make2");
    }

plz if you can help me with this it would be much apreciated

This may be because of the layout of your if statements.
Because there are two if statements, they can both run if the variables are true. However, if you use an else if statement, it will only run one. Here is what this would look like:

     if (depth < maxDepth && randomSpawn)
     {
         StartCoroutine(CreateChildrenRandom());
     }
     else if (depth < maxDepth && randomSpawn == false)
     {
         StartCoroutine(CreateChildren());
     }

This should allow only one of the co-routines to run.

If this fixed your problem, please accept my answer. If not, feel free to ask any more questions!