Object Referencing and Creation of Classes for data management

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

public class Quests : MonoBehaviour
{
   

    public class Reward
    {
        public int rvalue;
        public string rname;
        public Texture ricon;
        public Reward(string name, int value, Texture icon)
        {
            rname = name;
            rvalue = value;
            ricon = icon;
        }
    }
    public class Task
    {
        public string tname;
        public bool tfinished;
        public Task(string name, bool finished = false)
        {
            tname = name;
            tfinished = finished;
        }
    }

    public class Quest
    {
        public string qname;
        public string qdescription;
        public DateTime qstartingTime;
        public DateTime qdeadline;
        public List<Reward> qrewards;
        public List<Task> qtasks;
        public string qtype;


        public Quest(string name, DateTime startingTime = default(DateTime), DateTime deadline = default(DateTime), string description = "", List<Reward> rewards = default(List<Reward>), List<Task> tasks = default(List<Task>), string type = "")
        {
            qname = name;
            qdescription = description;
            qstartingTime = startingTime;
            qdeadline = deadline;
            qrewards = rewards;
            qtasks = tasks;
            qtype = type;
        }
    }

    public GameObject AddQuest;
    public GameObject AQTextfield;
    TextMeshPro AQTextfieldf;
    Animator AddQuestAnimator;
    public Text QuestTitle;
    public Slider Time;
    public Slider Progress;
    private TouchScreenKeyboard keyboard;
    public List<Quest> QuestList;

    // Start is called before the first frame update
    void Start()
    {
        AddQuestAnimator = AddQuest.GetComponent<Animator>();
        AQTextfieldf = AQTextfield.GetComponent<TextMeshPro>();
        Quest more = new Quest("acd");
        QuestList = default(List<Quest>);
        QuestList.Add(more);
       

    }

    // Update is called once per frame
    void Update()
    {
       
    }

    public void AddQuestAppear()
    {
        if (AddQuest.activeSelf == false) {
            AddQuest.SetActive(true);
            AddQuestAnimator.SetFloat("appear", 1f);
        }
        else {
            AddQuestAnimator.SetFloat("appear", 1f);
        }
    }
    public void AddQuestDisappear()
    {
        AddQuestAnimator.SetFloat("appear", 0f);
    }

    public void CreateQuest()
    {
        if (AQTextfieldf.text != "" && AQTextfieldf.text.Length <= 30)
        {
            QuestList.Add(new Quest(AQTextfieldf.text));
            //AQTextfieldf.text = "";
            AddQuestDisappear();
        }

    }

  

    public void BringUpKeyboard()
    {
        keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
    }

    int countFinishedTask(List<Task> rw) {
        int n = 0;
        foreach(Task x in rw)
        {
            if (x.tfinished == true)
            {
                n += 1;
            }
        }
        return(n);
    }
    void SaveData()
    {
   
    }

    void LoadData()
    {
   
    }

    public void UpdateUI()
    {
        Quest Term = QuestList.ToArray()[0];
        print(QuestTitle.text);
        print(Progress.maxValue);
        print(Progress.value);
        print(Term.qname);
        //QuestTitle.text = QuestList.ToArray()[0].qname;
        //Progress.maxValue = QuestList.ToArray()[0].qtasks.ToArray().Length;
        //Progress.value = countFinishedTask(QuestList.ToArray()[0].qtasks);

    }

    void UploadData()
    {
   
    }

    void DownloadData()
    {

    }

    void Login()
    {

    }

    void Music()
    {

    }

    //Quest Management Sections

    void OpenQuest()
    {

    }

    void CloseQuest()
    {

    }

    void FinishQuest()
    {

    }
}

Above is my code for a quest system, and when I reference my list of Quest, I get an error of “NullReferenceException: Object reference not set to an instance of an object”

I can’t figure it out by google search, so here I am.

I usually initialize a list of items via the following code:

QuestList = new List<Quest>();
QuestList.Add(quest);

That way, referencing the QuestList should not give you a NullReferenceException anymore.
I don’t know if default(List); is a valid way to initialize a list.

I’ve tried that previously, actually that is what i did initially, but it didn’t work so I changed it to the current one.
The error occurs when I use and reference the variable, for example in CreateQuest() or UpdateUI()

Never mind, found the problem, it is because the class is not serialized.