Save system not working for text

i am making a game and the text doesnt save with the save system please help!!!

Save system:
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using UnityEngine.UI;
public class SaveSystem : MonoBehaviour {
public static string text;
public static Text charText;

    public void SaveState()
    {
        BinaryFormatter bf = new BinaryFormatter();
        FileStream file = File.Create(Application.persistentDataPath + "/PlayerData.dat");
        
        PlayerData data = new PlayerData();
        
        data.text = UIInputField.text;
        data.charText = UIInputField.charText;
        
        
        
        bf.Serialize(file, data);
        file.Close();
    }
    
    public void LoadState()
    {
        if(File.Exists(Application.persistentDataPath + "/PlayerData.dat"))
        {
            BinaryFormatter bf = new BinaryFormatter();
            FileStream file = File.Open(Application.persistentDataPath + "/PlayerData.dat", FileMode.Open);
            PlayerData data = (PlayerData) bf.Deserialize(file);
            file.Close();
            
            UIInputField.text = data.text;
            UIInputField.charText = data.charText;
            
           
        }
    }
}

[Serializable]
class PlayerData
{
    public string text;
    public Text charText;
}

UIInputField(works):
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class UIInputField : MonoBehaviour {
    
    public static Text charText;
    public static string text;

	// Use this for initialization
	void Start ()
     {
         charText = GameObject.Find("CharText").GetComponent<Text>();
	
	}
	
	// Update is called once per frame
	public void CharacterField(string inputFieldString)
    {
        charText.text = inputFieldString;
        text = inputFieldString;
        charText.text = text;
    }
    public void load()
    {
        charText.text = text;
    }
}

@SoundPuppy

You are trying to save the whole Text component in the PlayerData class. You should instead try saving just the relevant data from the charText component and restoring that info in LoadState().