My enemy spawner just spawns 1 and stops spawning enemys.

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

public class EnemySpawner : MonoBehaviour
{
[SerializeField]
private float spawnRadius = 7, time = 4f;

public GameObject[] enemies;

// Start is called before the first frame update
void Start()
{
    StartCoroutine(SpawnAnEnemy());
}

IEnumerator SpawnAnEnemy()
{
    Vector2 spawnPos = GameObject.Find("Player").transform.position;
    spawnPos += Random.insideUnitCircle.normalized * spawnRadius;

    Instantiate(enemies[Random.Range(0, enemies.Length)], spawnPos, Quaternion.identity);
    yield return new WaitForSeconds(time);
}

}

That’s because you are only invoking the coroutine once (on start) and then never again. You need to call it every x seconds.
_
private WaitForSeconds waitTime = new WaitForSeconds(5);

private void Update()
{
    if (!spawningEnemy)
    {
        StartCoroutine(SpawnNewEnemy());
    }
}

private IEnumerator SpawnNewEnemy()
{
    spawningEnemy = true;

    // spawn a new enemy

    yield return waitTime;

    spawningEnemy = false;

}

_
or use invoke repeating
_

_

InvokeRepeating("NameOfMethod", initialTime, repeatTime);
_
start after 2 seconds and invoke every 2 seconds
_
InvokeRepeating("NameOfMethod", 2.0f, 2.0f);