How do I stop the parents script from affecting the child?

In my game my character gets killed when colliding with something with the death tag. My character also has this child object that will pop up in front of him and when it touches an enemy it will kill them. However when the child touches the object the character starts the death script, even though my character isn’t touching anything with the death tag. How do I stop the death script from affecting the child?
Death Script:
174640-image-2021-01-22-140747.png

Write a new Death class for your child objects and attach it to the child object, make it destroy it or deactivate it.

public ChildDeath:MonoBehaviour
{
     public void OnCollision()
     {
          if(other.gameObject.tag=="Death")
               Destroy(gameObject);
     }
}