How to shoot bullets in series in Unity

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

public class EnemySeriesShooting : MonoBehaviour
{
    public GameObject bulletPrefab;
    public Transform aim;
    public float timeBetweenSeries = 2f;
    public float timeBetweenBullets = 0.2f;
    public int howManyBulletsInSeries = 5;
    void Start()
    {
        InvokeRepeating("Shoot", 0f, timeBetweenSeries);
    }

    void Shoot()
    {
        StartCoroutine(ShootCorutine());
    }

    IEnumerator ShootCorutine()
    {
        int i = 0;
        while(i < howManyBulletsInSeries)
        {
            GameObject bullet = Instantiate(bulletPrefab, aim);
            bullet.GetComponent<Rigidbody2D>().velocity = new Vector2(Random.Range(-10f, -6f), Random.Range(-4f, 4f));
            Destroy(bullet, 3f);
            yield return new WaitForSeconds(timeBetweenBullets);
            i++;
        }
    }
}

Download project files