IEnumerator while loop dont work in Start method [Resolved]

I have a trap object that starts shooting projectiles once the game has started, it will shoot automatically forever, on an infinite loop. before I used an InvokeReapting() for testing it was working, but now when I try to put the StartCoroutine() of the IEnumerator in Start, it does not work and shows error

NullReferenceException: Object reference not set to an instance of an object

When I put it in the Update it works but it duplicates the projectiles endlessly and it becomes a mess, from what it looks like its basically duplicate the object itself. the code suppose to instantiates the projectile, because it ignores my timer to delay shoot between shots, every shot has a break before shooting again and clones are also being destroyed, in update all of that is ignored.

So what could not make it work in start?

This is my code in my projectile script

IEnumerator ShootProjectiles()
{
    while (true)
    {
        // Shoot a projectile
        Shoot();

        // Wait for the specified interval before shooting again
        yield return new WaitForSeconds(shootingInterval);
    }
}

and this is my start method in projectile script

void Start()
{
    trapScript = FindObjectOfType<Trap>();

    if (trapScript == null)
    {
        Debug.LogError("Trap script not found!");
    }

    StartCoroutine(ShootProjectiles());
} 

OP Answered in comment: