Can I make Money collecting script without attaching it to a object ? I tried but I got error

When i am trying to make my money variables file without attaching it to object it stuck in 5 how to fix it ? It only works when monevariables.cs is a component

moneysystem.cs attached to object called moneyonground(a basic cube ) and the money variables attaced to variablesobj in order to work

CODE GIVES ME ERROR
Moneysystem.cs

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

public class moneysystem : MonoBehaviour
{

    moneyvariables mv = new moneyvariables();
    
    bool intrigger;


    // Use this for initialization
    void Start() {
        

    }

    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            intrigger = true;

        }
    }
    private void OnTriggerExit(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            intrigger = false;

        }
    }

    

    // Update is called once per frame
    void FixedUpdate () {


		if(intrigger)
{
            
                if (Input.GetKeyDown(KeyCode.G))
                {


             

                    mv.money = mv. money + mv.moneyonpaper;

                    Debug.Log(mv.money);
                    Destroy(gameObject);

                

                }

        }



	}
}

MoneyVariables.cs

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

public class moneyvariables  : MonoBehaviour
{
    public  int money;
    public  int moneyonpaper = 2;
    public  int cost;

}

You can´t, you need get the component to change her variables.

if (Input.GetKeyDown(KeyCode.G))
                {




                    GameObject.Find("moneyground").gameObject.GetComponent<moneyvariables>().money + mv.moneyonpaper;

                    Debug.Log(mv.money);
                    Destroy(gameObject);



                }

Try this:

public class moneysystem : MonoBehaviour
{
    [HideInInspector]public moneyvariables mv = new moneyvariables();

    void OnTriggerStay (Collider other)
    {
        if (other.CompareTag("Player")) {
            mv.AddMoneyOnPaper();
        }
    }

}

public class moneyvariables
{
    public int money;
    public int moneyonpaper = 2;
    public int cost;

    public void AddMoneyOnPaper ()
    {
        money += moneyonpaper; //Writing += is like money = money + moneyonpaper.
    }
}

I believe there is no reason to destroy it. Maybe destroy other.gameObject, but not this.gameObject.