How to start coroutine for one time in update function when number passed another number

I have a number that will increase and decrease. I want to start a coroutine in update function for only one time when number passes 10 or number decreases from 10. also there will be other milestones like 50 100 500.

I couldn’t figure out how can I do that in c#

I think this should do

    private float ourValue;
    private const float desiredValue = 10f;
    private void Start()
    {
        StartCoroutine(HasValueBeenReached());
    }

    private IEnumerator HasValueBeenReached()
    {
        yield return new WaitUntil(() => ourValue >= desiredValue);
    }