why Physics.Raycast is not working

Can some body tell me why the the following code is not working

    void Move()
    {
        RaycastHit hit;
        if (Physics.Raycast(transform.position,Vector3.forward,out hit,10))
        {
            //if wall is on the front stop
            if(hit.transform.tag=="Walls")
            {
            Debug.Log("i am stop");
                ch.Move(Vector3.zero);
            }

            
            else
            {
            //Debug.Log(hit.transform.tag);

            Debug.DrawLine(transform.position, hit.point, Color.red);
                velocity = Player.transform.position - transform.position;

                velocity = Vector3.Normalize(velocity);

                velocity *= moveSpee;
                ch.Move(velocity * Time.deltaTime);
        }
        }

        }
        

    }

The line below casts the ray from the object position in the direction of the Vector3.forward, the world’s forward

 if (Physics.Raycast(transform.position,Vector3.forward,out hit,10))

I guess you want to cast in the object forward

 if (Physics.Raycast(transform.position,transform.forward,out hit,10))