how do i grab Components variables and put them in a list

i need the variables from my components in the scene and put them in a list so i can use them later but fieldinfo is not working is there anther way for me to do this

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

[System.Serializable]
    public class AllObjs
    {
        public string ObjectName;
        public Component[] ObjComponents;
        public FieldInfo[] ComponentsValues;
    }
    public List<GameObject> InGameObjs;
    public List<AllObjs> MyHierarchy;
void Start {
GameObject[] SceneHierarchy = GameObject.FindObjectsOfType<GameObject>();
        foreach (GameObject GO in SceneHierarchy)
        {
            InGameObjs.Add(GO);
            MyHierarchy.Add(new AllObjs());
            MyHierarchy[MyHierarchy.Count - 1].ObjectName = GO.name;
            MyHierarchy[MyHierarchy.Count - 1].ObjComponents = GO.GetComponents<Component>();
            MyHierarchy[MyHierarchy.Count - 1].ComponentsValues = GO.GetComponents<Component>().GetType().GetFields();

        }
}

I would assume nothing is happening because this is a plain C# class, which doesn’t receive Unity messages such as Start().

You’ll need an external monobehaviour component to call your code in a plain C# class.

the public class AllObjs are properties of my list for (MyHierarchy) i can get the components in the unity scene from all the objects in the game but i need to get the properties from ever component in the scene and put them in a corresponding list. the code above is not the full script it is just the part im have the issue with