The type or namespace name 'Enemy' could not be found

Can anyone help me with this the exact error is this

Assets\Prefabs\Bullet.cs(19,9): error CS0246: The type or namespace name 'Enemy' could not be found (are you missing a using directive or an assembly reference?)

and the script is this

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour
{

    public int damage = 40;
    public float speed = 20;
    public Rigidbody2D rb;

    void Start()
    {
        rb.velocity = -transform.up * speed;
    }

    void OnTriggerEnter2D (Collider2D hitInfo) 
    {
        Enemy enemy = hitInfo.GetComponent<Enemy>();
        if (enemy != null) {
            enemy.TakeDamage(damage);
        }
        Destroy(gameObject);
    }
}

and another script to reference enemy.TakeDamage(damage); is

using UnityEngine;

public class EnemyScript : MonoBehaviour
{
    public int Health = 100;
    public GameObject deathEffect;

    public void TakeDamage(int damage) 
    {
        Health -= damage;

        if (Health <= 0) {
            Die();
        }
    }

    void Die() 
    {
        Instantiate(deathEffect, transform.position, Quaternion.identity);
        Destroy(gameObject);
    }
}

Your enemy script is called “EnemyScript”, but you’re trying to get the “Enemy” component in your bullet script, which does not exist.

The name of the script that contains public void TakeDamage(int damage) is EnemyScript not Enemy.