How to increase the spawn rate of an object over time?

Hey everyone, I’m new to coding. It seems like people are very nice and helpful on here, so I thought I’d ask a question I’ve been stuck on for a long time now. I’m currently making a 2D game where balls are dropping from the top of the screen to the bottom of the screen. Your goal is to pick them up, and if you let one fall on the ground, you lose. The spawn rate is set to 2 sec. I want this increased by 0.1 sec every 30 seconds (2 sec, 1.9 sec, 1.8 sec, etc.). I feel like I’m close, but I can’t seem to get it to work. Here is the code I’m working on. Tell me, how can I make this happen? Thank you in advance!

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

public class SpawnBallsNew : MonoBehaviour
{
    public GameObject fallingObject;

    float delayAndSpawnRate = 2;
    float timeUntilSpawnRateIncrease = 30;

    void Start()
    {
        InvokeRepeating("SpawnObject", delayAndSpawnRate, delayAndSpawnRate);
        StartCoroutine(ScheduleIncreases());
    }

    void SpawnObject()
    {
        float x = Random.Range(-11, 11);

        Instantiate(fallingObject, new Vector2(x, 7), Quaternion.identity);
    }

    IEnumerator ScheduleIncreases()
    {
        yield return new WaitForSeconds(timeUntilSpawnRateIncrease);
        IncreaseSpawnRate();
        StartCoroutine(ScheduleIncreases());
    }

    void IncreaseSpawnRate()
    {
        if (delayAndSpawnRate > 1)
        {
            delayAndSpawnRate -= 0.1f;
        }
    }
}

public class SpawnBallsNew : MonoBehaviour
{
public GameObject fallingObject;

    float delayAndSpawnRate = 2;
    float timeUntilSpawnRateIncrease = 30;

    void Start()
    {
        StartCoroutine(SpawnObject(delayAndSpawnRate));
    }

    IEnumerator SpawnObject( float firstDelay )
    {
        float spawnRateCountdown = timeUntilSpawnRateIncrease ;
        float spawnCountdown = firstDelay ;
        while( true )
        {
            yield return null ;
            spawnRateCountdown -= Time.deltaTime;
            spawnCountdown     -= Time.deltaTime;

            // Should a new object be spawned?
            if( spawnCountdown < 0 )
            {
                spawnCountdown += delayAndSpawnRate;
                Instantiate(fallingObject, new Vector2(Random.Range(-11, 11), 7), Quaternion.identity);
            }

            // Should the spawn rate increase?
            if( spawnRateCountdown < 0 && delayAndSpawnRate > 1 )
            {
                spawnRateCountdown += timeUntilSpawnRateIncrease;
                delayAndSpawnRate -= 0.1f;
            }
        }
    }
}

@Hellium you may not see this but it is worth a shot anyway. I am currently using your code and I have the Delay and Spawn Rate set to 20 along with the timeUntilSpawnRateIncrease set to 1. For some reason the script stops working when the Delay and Spawn Rate reaches 18.09999. Any suggestions?,I don’t know if anyone will see this but when I implement this code it stops working after some of the countdown. If I start it at 20 Delay and Spawn Rate with timeUntilSpawnRateIncrease of one it ends at 18.09999999. If anyone sees this that may have a fix it is very apprecitated!