Saving with multiple scenes

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

[System.Serializable]
public class Data
{
public Vector3 playerPosition;
public SerializableDictionary<string, bool> memoryCollected;

public Data()
{
    this.playerPosition = new Vector3(-248.7f, 3f, 2452.7f);
    memoryCollected = new SerializableDictionary<string, bool>();
    
}

public int GetPercentageComplete()
{
    int totalCollected = 0;
    foreach (bool collected in memoryCollected.Values)
    {
        if (collected)
        {
            totalCollected++;
        }
    }

    int percentageCompleted = -1;
    if (memoryCollected.Count != 0)
    {
        percentageCompleted = (totalCollected * 100 / memoryCollected.Count);
    }
    return percentageCompleted;
}

}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using UnityEngine.SceneManagement;

public class DataPersistenceManager : MonoBehaviour
{
[Header(“File Storage Config”)]
[SerializeField] private string fileName;

private Data GameData;
private List<IDataPersistence> dataPersistenceObjects;
private FileDataHandler dataHandler;
public static DataPersistenceManager instance { get; private set; }

private void Awake()
{
    if (instance != null)
    {
        Debug.Log("Found more than one Data Persistence Manager. Destroying the new one.");
        Destroy(this.gameObject);
        return;
    }
    instance = this;
    DontDestroyOnLoad(gameObject);

    this.dataHandler = new FileDataHandler(Application.persistentDataPath, fileName);
}

private void OnEnable()
{
    SceneManager.sceneLoaded += OnSceneLoaded;
    SceneManager.sceneUnloaded += OnSceneUnloaded;
}

private void OnDisable()
{
    SceneManager.sceneLoaded -= OnSceneLoaded;
    SceneManager.sceneUnloaded -= OnSceneUnloaded;
}

public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
    Debug.Log("OnSceneLoaded Called");
    this.dataPersistenceObjects = FindAllDataPersistenceObjects();
    LoadGame();
}

public void OnSceneUnloaded(Scene scene)
{
    Debug.Log("OnSceneUnloaded Called");
    SaveGame();
}

public void NewGame()
{
    this.GameData = new Data();
}

public void LoadGame()
{
    this.GameData = dataHandler.Load();
    if (this.GameData == null)
    {
        Debug.Log("No data was found.");
        return;
    }


    foreach (IDataPersistence dataPersistenceObj in dataPersistenceObjects)
    {
        dataPersistenceObj.LoadData(GameData);
    }
    Debug.Log("Loaded Memory Frag = " + GameData.memoryCollected);
}


public void SaveGame()
{
    if (this.GameData == null)
    {
        Debug.Log("No data was found.");
        return;
    }

    

    foreach (IDataPersistence dataPersistenceObj in dataPersistenceObjects)
    {
        dataPersistenceObj.SaveData(GameData);
    }

    Debug.Log("Saved Memory Frag = " + GameData.memoryCollected);

    // Use the correct variable name for the fileDataHandle (change fileDataHandle to dataHandler)
    dataHandler.Save(GameData);
}

private void OnApplicationQuit()
{
    SaveGame();
}

private List<IDataPersistence> FindAllDataPersistenceObjects()
{
    IEnumerable<IDataPersistence> dataPersistenceObjects = FindObjectsOfType<MonoBehaviour>().OfType<IDataPersistence>();
    return new List<IDataPersistence>(dataPersistenceObjects);
}

public bool HasGameData()
{
    return GameData != null;
}

}
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class Changescene : MonoBehaviour
{
[SerializeField] private Button newGame;
[SerializeField] private Button loadButton;

private void Start()
{
    // Ensure DataPersistenceManager is present in the scene
    if (DataPersistenceManager.instance == null)
    {
        Debug.LogError("DataPersistenceManager not found in the scene.");
    }
}

public void CreateNewGame()
{
    if (DataPersistenceManager.instance != null)
    {
        DataPersistenceManager.instance.NewGame();
        SceneManager.LoadSceneAsync("Stage1");
    }
    else
    {
        Debug.LogError("DataPersistenceManager is null. Make sure it's present in the scene.");
    }
}

public void Settings()
{
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 2);
}

public void Load()
{
    if (DataPersistenceManager.instance != null)
    {
        DataPersistenceManager.instance.LoadGame();
    }
    else
    {
        Debug.LogError("DataPersistenceManager is null. Make sure it's present in the scene.");
    }
}

public void Back()
{
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - 2);
}

public void QuitGame()
{
    Application.Quit();
}

}

Can someone help. In my current scripts all I can save is the player position and the memory fragments collected. I have 3 stages and I want to implement saving from those stages from their own scenes. I tried different solutions but none of them is working.

I think it is necessary to show the structure of your project.
yukiamano221@gmail.com