Activating a Meshrenderer in code

Question, in my armor system, when you equip said item I need it to turn on the MeshRenderer of the correct item.
My player has all equipment on him, just turned off. So, when I equip a “mask” I want the mask to turn on the MeshRenderer of the correct item.

Below is my script:

public class ArmorConfig : StatsEquipableItem
  
[SerializeField] GameObject gameObject = null;
        [SerializeField] float armorRating = 5f;
        [SerializeField] float damageResistance = 0;

        const string armorName = "Armor";

        public Armor Spawn()
        {
            DestroyOldWeapon(gameObject);

            Armor armor = null;

            if (gameObject != null)
            {
                MeshRenderer m = gameObject.GetComponent<MeshRenderer>();
                m.enabled = true;
                armor.gameObject.name = armorName;
            }
            return armor;
        }

        private void DestroyOldWeapon(GameObject equippedArmor)
        {
            MeshRenderer m = gameObject.GetComponent<MeshRenderer>();
            m.enabled = false;
        }

        public float GetArmor()
        {
            return armorRating;
        }

        public float GetResistance()
        {
            return damageResistance;
        }
        }

From the looks of it you are just turning to renderer off on the game object the script is attached to not your actual armour? if all your armour if already on the player would it not be easier to put them in an array and access it that way? armour[i].GetComponent<MeshRenderer>().enabled = true?
or maybe change
MeshRenderer m = gameObject.GetComponent();
to
MeshRenderer m = equippedArmor.GetComponent();

An array would prob work. Was trying to convert it form my system already in place lol. Might just have to redo it entirely.