How to detect if the enemy was shot?

I tried using this method but not in entry if. I want to know when the bullet hit the enemy from the enemy

 void OnTriggerEnter2D(Collider2D colisor)
    {
        Debug.Log("Okay");
        if (colisor.gameObject.tag == "Bullet")
        {
            Destroy(colisor.gameObject);
            vida--;
            Debug.Log("Okay2");
        }
    }

use tags for your players and enemies and when shot by a enemy if used that tag it will only count when form an enemy
tags will help you here