How can I check if im landing?

I want to make a script that my player starts playing a falling animation when he is not landing

but I don’t know how to do it

I guess I have to use onCollisionEnter() but I dont know how

I know how to use animator, my character moves but i dont know how to check it

thank you for the help

You have some options.

public float onFloorY;
void Start()
{
     onFloorY = transform.position.y;
}

public void CheckFloor()
{
     if(transform.position.y  > onFloor)
     {
          Debug.Log("is in the air");
     } else
     {
         Debug.Log("is on floor");
     }
}