My bullets fly through enemies. 2d game

I have checked some posts already but none of them solved my problem. As stated I “fire” my “bullet”, towards the mouse cursor, yet it doesnt collide with enemy.

void Update()
{
    if (Input.GetButtonDown("Fire1"))
    {
        GameObject spell = Instantiate(projectile, transform.position, Quaternion.identity);
        Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        Vector2 myPos = transform.position;
        Vector2 direction = (mousePos - myPos).normalized;
        spell.GetComponent<Rigidbody2D>().velocity = direction * projectileForce;
        spell.GetComponent<TestProjectile>().damage = Random.Range(minDamage, maxDamage);
    }

}

void OnTriggerEnter2D(Collider2D collision)
{
if(collision.name != “Player”)
{
if(collision.GetComponent() != null)
{
collision.GetComponent().DealDamage(damage);
}
Destroy(gameObject);
}
}