Player doesn't detect ground by using Raycast

Hey, For some reason my Player doesn’t detect the ground properly, I can’t find the issue or why is it happening but it has to be something with the layer,And I already checked. There’s a layer called Ground.
Here is my code:

    // If the Player is Grounded
    bool Is_Grounded = Physics2D.Raycast(transform.position, transform.position - (new Vector3(0, 0.6f)), -0.6f, LayerMask.NameToLayer("Ground"));
    Debug.DrawLine(transform.position, transform.position - (new Vector3(0, 0.6f)), Color.black, 1f);
    if (Is_Grounded == true)
    {
        Debug.Log("Grounded");
    }

    if( Is_Grounded == false)
    {
        Debug.Log("Not Grounded");
    }

Thanks for the help

Change “LayerMask.NameToLayer(“Ground”)” to “1 << LayerMask.NameToLayer(“Ground”)”.