Any advise on the pros and cons of creating and reusing a single variable from a single class?

Currently I have this StatValue class with only one variable and its purpose is for other classes to use it as the main source of a float value.

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

[System.Serializable]
public class StatValue
{
    [SerializeField] private float baseStat;

    public float getValue()
    {
        return baseStat;
    }

    public float modifyValue(float v)
    {
        baseStat += v;

        return baseStat;
    }

}

The class Character_Info for example creates 4 different stats using StatValue class Hp, MS, morale and def under the header Character Stat as oppose to using the float variables within this class itself under the header Remember Stat. This class will be used for different enemies and allies alike.

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

public class Character_Info : MonoBehaviour
{
    [SerializeField] private Race characterRace;
    bool isDead;

    [Header("Character Stat")]
    [SerializeField] StatValue HP;
    [SerializeField] StatValue movementSpeed;
    [SerializeField] StatValue morale;
    [SerializeField] StatValue def;

    [Header("Remember Stat")]
    [SerializeField] float r_HP;
    [SerializeField] float r_movementSpeed;
    [SerializeField] float r_morale;
    [SerializeField] float def;

    private void Update()
    {
        if (HP.getValue() <= 0)
        {
            isDead = true;
        }

        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            dealDamageToCharacter();
        }

    private void dealDamageToCharacter()
    {
        if (!isDead)
        {
            HP.modifyValue(-4.0f);
            Debug.Log("take damage");
        }
     }
    }
}

My question here is, is there any benefit or downside to continuously use the StatValue class as my main float variable compare to creating 4 different floats under the Remember Stat? Is using this method more efficient in terms of performance?

So, first thing to point out is you aren’t creating and reusing a single variable. By going this route, you are actually creating 4 instances of the StatValue class. So you have 4 references that are created.

Now, if you use a float directly, this would be a value type, but you can go and look up the difference between value types and reference types and honestly, I think you should if you aren’t familiar with it.

There is nothing wrong with using a script to track values and have methods in it that affect those values.