How to change the frequency of an animation loop?

Hello!

So I was basically looking for a way to make my animation loop once, then wait a bit, loop again, then wait again, then loop, and so on, instead of making it animate slowly, and didn’t find a one. I think that through script it should be possible. Any ways to do this?

private Animator anim;
float waitForABit;

    void Start()
    {
        anim = GetComponent<Animator>();
    }

    void Update()
    {
        if(anim["AnimationName"].normalizedTime == 1f)
        {
            anim["AnimationName"].speed = 0;
            StartCoroutine(playNewLoop());
        }
    }

    IEnumerator playNewLoop()
    {
        yield return new WaitForSeconds(waitForABit);
        anim["AnimationName"].speed = 1;
    }