Gun Ammo Text Problem

Hello I have a gun switching system with gun data on each specific gun, i want to have the current amount of ammo and the mag size as text at the side, but it can only use it from gun data on a specific gun, is there anyway to switch it or something else?

the current score system

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

public class GunAmmoText : MonoBehaviour
{
    [SerializeField] TextMeshProUGUI Ammo_Text;
    [SerializeField] GunData GunData ;         
    void Update()
    {
        Ammo_Text.text = GunData.currentAmmo + "/" + GunData.magSize;
    }
}

the gun data script which you kinda fill out

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

[CreateAssetMenu(fileName = "Gun" , menuName = "Weapon/Gun")]

public class GunData : ScriptableObject
{
    [Header("Info")]
    public new string name;

    [Header("Shooting")]
    public float damage;
    public float MaxDistance;

    [Header("Reloading")]
    public int currentAmmo;
    public int magSize;
    public float fireRate;
    public float reloadTime;
    [HideInInspector]
    public bool reloading;
}

You could make something like this:

//This is where you put all your GunData Scriptables
[SerializeField] private List<GunData> guns = new List<GunData>();

//Also adding an index, just keep reading, you will see for what it is used
private int gunIndex = 0;

In Update you could change it to something like this:

void Update()
{
    if (Input.GetKeyDown(KeyCode.Z))
    {
        gunIndex++;
        if (gunIndex > guns.Count)
        {
            gunIndex = 0;
        }
    }

    if (Input.GetKeyDown(KeyCode.X))
    {
        gunIndex--;
        if (gunIndex < 0)
        {
            gunIndex = guns.Count - 1;
        }
    }

    Ammo_Text.text = guns[gunIndex].currentAmmo + "/" + guns[gunIndex].magSize;
}