Calling an instance from another class

I am trying to call an instance from a different script into this script. I am working on a level for school and am trying to make my pressure plate mechanic read the weight of the objects that are put on it and I’ve got it all figured out except for this part where I’m trying to get this script to add it’s weight value to the instance “currentWeightOnPlate” from my other script “Pressure Plate” I have attached my coding and it is in C#

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

public class ST_Weight : MonoBehaviour
{
    public int weight = 30;
    public GameObject PressurePlate;

    private void Start()
    {
        GetComponent<PressurePlate>().currentWeightOnPlate;
        if (GetComponent<ST_Weight>() != null)

        {
            //This is a "weighted" object
            GetComponent<PressurePlate>().currentWeightOnPlate += GetComponent<ST_Weight>().weight;
        }
    }
} // End of Class

public class ST_Weight : MonoBehaviour
{
public int weight = 30;

     // Drag & drop the gameObject holding the Pressure plate component
     public PressurePlate PressurePlate;
 
     private void Start()
     {
         if( PressurePlate != null )
              PressurePlate.currentWeightOnPlate += weight;
     }
 } 

However, I don’t believe that’s really what you want in the end. Don’t you want to add the weight to the pressure plate only when the object is put on the pressure plate? If so, you will have to use the Physics engine and the appropriate MonoBehaviour messages to detect the “collision” between the object and the pressure plate.

Something like this:

public class ST_Weight : MonoBehaviour
{
  public int weight = 30;

  private void OnTriggerEnter(Collider other)
  {
       PressurePlate PressurePlate = other.GetComponent<PressurePlate>();
      if( PressurePlate != null )
           PressurePlate.currentWeightOnPlate += weight;
  }

  private void OnTriggerExit(Collider other)
  {
       PressurePlate PressurePlate = other.GetComponent<PressurePlate>();
      if( PressurePlate != null )
           PressurePlate.currentWeightOnPlate -= weight;
  }

}