Some scripts stop working on build but work in editor?

I’m working on my first ever project that has to be handed in next week and it was all running smoothly in the editor but when I export the game, some of the scripts don’t seem to work.

As far as I can tell, the scripts in questions are the ones that control damage & healing.
They’re split into 3 different scripts.

collect.cs

public class collect : MonoBehaviour
{
    public int Mana;
    public int Gesundheit;
    public AudioSource Eat;
    public AudioSource Squeak;

    private void OnTriggerEnter2D(Collider2D other)
    {
        GameObject.Find("GAME").GetComponent<GAME>().gesammelt(Mana, Gesundheit);
        if (gameObject.tag=="heal")
        {
            Eat.Play();
            gameObject.SetActive(false);
        }

        if (gameObject.tag == "thorns")
        {
            Squeak.Play();
        }

    }
}

values.cs

[CreateAssetMenu(fileName = "Werte", menuName = "Daten/Speicher/Werte")]
public class Werte : ScriptableObject, ISerializationCallbackReceiver
{
  public int Mana = 0;
  public int Gesundheit = 100;

  private int DefaultMana = 100;
  private int DefaultGesundheit = 100;

  public void OnBeforeSerialize()
  {
    
  }

  public void resetvalues()
  {
    Mana = DefaultMana;
    Gesundheit = DefaultGesundheit;
  }
  
  public void OnAfterDeserialize()
  {
    Mana = DefaultMana;
    Gesundheit = DefaultGesundheit;
  }
}

and the GAME.cs to manage it all.

public class GAME : MonoBehaviour
{
    //public Text Punkteanzeige;
    public Werte Spielstand;
    public GameObject rat;
    public GameObject explosion;
    public RectTransform barFillRT;
    private Vector3 barFill;
   
    void Start()
    {
        barFill = barFillRT.localScale;

    }

    public void gesammelt(int p, int g)
    {
        Spielstand.Mana += p;
        Spielstand.Gesundheit += g;
        Spielstand.Gesundheit = Mathf.Clamp(Spielstand.Gesundheit,0, 100);
        barFill.x = Spielstand.Gesundheit/100f;
        barFillRT.localScale = barFill;
        if (Spielstand.Gesundheit<=0)
        {
            GameObject exp=Instantiate(explosion, transform.position,transform.rotation);
            exp.transform.position = rat.transform.position;
            rat.SetActive(false);
            StartCoroutine("RestartLevel");
        }
        
    }
    
    
    IEnumerator RestartLevel() {
        yield return new WaitForSeconds(3f);
        Spielstand.resetvalues();
        SceneManager.LoadScene(SceneManager.GetActiveScene().name);
    }
    
    }

Anyone know why those aren’t exported/don’t work in the exported game?
I checked the console but it isnt giving me any errors.

Hello. Scripts seems correct, the problem is not here. You should know first what is happening exactly. As @JPhilipp says, What is happening? Do something to know what parts of the code are beeing called, like create a text in a canvas to “say” and “check” when the code reach some parts of the code, so you can know for example if the trigger part code is beeing called while the game is built and running. MAybe is a collider-detection problem. Are the objects moving very fast? Then Change Collision detection to Continous from the inspector.

Good luck"