Cant use foreach loop on my custome class

i am Trying to make a custom class, to arrange the wave of enemies more simple, so my class will set the enemies health,gold and it will be different for each wave. so i can modify and manage my enemies more properly, but i get an error and i dont know how to fix it. Here is my Code.

public class  GameManagerScript : MonoBehaviour {
    	// Created a Custom Class to make each wave different
    	[System.Serializable]
    	public class  EnemyManager  {
    					
    	public GameObject enemy;
    	public int maxEnemies;
    	public float timebetweenspawns = 1.5f;
    	public int EnemyGold;
    	public int EnemyCurrentHealth;
    		
    	}
    
    public List <EnemyManager> EnemySpawn = new List<EnemyManager>();
    	[SerializeField]
    	private Transform SpawnPoint;
    	private int waveLevel;
    	private int totalSpawned = 0;
    	private int AliveEnemies;
    	private int enemiesIndex;
    	private bool EnemiesNumeratorActive = false;
    	[SerializeField] 
    	private int CurrentGold;
    
    void Start () {
    		UIText = FindObjectOfType<Text> ();
    
    		EnemyHealth enemyhealth = gameObject.GetComponent<EnemyHealth> ();
    
    		foreach (EnemyManager enemies in EnemySpawn[enemiesIndex].enemy) {
    
    			enemyhealth.AddHealth (EnemySpawn [enemiesIndex].EnemyCurrentHealth);
    			
    		}

I believe what you want is:

foreach (EnemyManager enemy in EnemySpawn)
{
	enemyhealth.AddHealth(enemy.EnemyCurrentHealth);
}

unfortunately it doesnt work, it says, " object reference not set to an instance of an object"

what i want to do is to take the Enemy gameobject reference from the custom class and get its component and then send the currenthealth to that object.

so i try to use foreach loop to get every single enemy object from the list and add the health accordingly