How to Fade a Sprite after time has passed since it stops moving

Hello, I am trying to fade a sprite after some time has passed since the object stops moving. I tried finding it in other questions but I didn’t find it.

Currently I have the following:

public class MoneyStates : MonoBehaviour
{
MoneyMovement moneyMovement;
SpriteRenderer moneySprite;
float alpha;
bool isMoving;

// Start is called before the first frame update
void Start()
{
    moneyMovement = GetComponent<MoneyMovement>();
    moneySprite = GetComponent<SpriteRenderer>();
    isMoving = false;

}

// Update is called once per frame
void Update()
{
    isMoving = moneyMovement.isMoving;
    if (isMoving)
    {
        alpha = 1f;
        moneySprite.color = new Color(moneySprite.color.r, moneySprite.color.g, moneySprite.color.b, alpha);

    } else
    {
        Invoke("Fade", 3);
    }
   
}

void Fade()
{
    StartCoroutine(Devalue());
}



IEnumerator Devalue()
{
    for (float f = 1f; f >= 0; f -= 0.01f)
    {
        alpha = f;
        moneySprite.color = new Color(moneySprite.color.r, moneySprite.color.g, moneySprite.color.b, alpha);
        yield return new WaitForSeconds(0.01f);

    }
}

}

It is not really working. Do you guys have any suggestions?

[Min(0)] public float DelayBeforeFade = 3;
[Min(0.01f)] public float FadeDuration = 1;
private MoneyMovement moneyMovement;
private SpriteRenderer moneySprite;
private float alpha;
private float delay;

// Start is called before the first frame update
void Start()
{
    moneyMovement = GetComponent<MoneyMovement>();
    moneySprite = GetComponent<SpriteRenderer>();
    alpha = moneySprite.color.a;
    delay = DelayBeforeFade;
}

// Update is called once per frame
void Update()
{
    if (moneyMovement.isMoving)
    {
        alpha = 1f;
        delay = DelayBeforeFade;
    }
    else if(delay <= 0)
    {
        alpha = Mathf.Max(alpha - Time.deltaTime / FadeDuration, 0);
    }
    else
    {
        delay -= Time.deltaTime;
    }

    moneySprite.color = new Color(moneySprite.color.r, moneySprite.color.g, moneySprite.color.b, alpha);
}