why can i call a function from one void but not another?

In this code bellow i am trying to use the sn.die_ally(); function. somehow it works in the start function but does not work in any of the others. I dont know what to google to find the answer because i am a newbie

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

public class die : MonoBehaviour
{

    public void Start()
    {
        diie_ally sn = gameObject.GetComponent<diie_ally>();
        sn.die_ally();
       
    }

    public void Update()
    {
        sn.die_ally();
    }

    public void OnTriggerStay2D(Collider2D collision)
    {
        if (collision.gameObject.tag == "Enemy")
        {
            Destroy(gameObject);
        }

        if (collision.gameObject.tag == "Ally")
        {
            Debug.Log("Player nuddade en Ally");
            sn.die_ally();
        }


    }

   
}

[ICODE][/ICODE]

You defined the object in Start, so it doesn’t exist outside of Start. You need to define it at the class level instead of inside your method, and then assign it in Start.

Also, it’s a good idea to use standard naming convensions, especially if you’re going to be asking others for help:

public class MyClassUsesUppercase : MonoBehaviour
{
     DieAlly myMeaningfulFieldNameStartsLowercase;

     private void Start()
     {
          myMeaningfulFieldNameStartsLowercase = gameObject.GetComponent<DieAlly>();
          myMeaningfulFieldNameStartsLowercase.FunctionUppercaseNotSameNameAsClass();
     }
}

You need to learn the concept of variable scope.