Object moving on XY instead of XZ

Hi, I am new to Unity and trying to learn while making a basic game.
I am trying to put controls to a cube that is going to fall from high to a platform and bounce back. Basically the player is going to try keeping it within the boundaries of the platform.

I used the basic controller for the player but it seems like my cube moving only on X and Y axes, instead of X and Z. I don’t want the player to control the cubes falling or moving upwards since it already has a rigidbody attached. How can I make it move only on XZ? Thanks.

    void Update()
    {
        float Horz = Input.GetAxis("Horizontal");
        float Vert = Input.GetAxis("Vertical");

        transform.position = transform.position + new Vector3(Horz * MoveSpeed * Time.deltaTime, Vert * MoveSpeed * Time.deltaTime, 0);

    }

Your new Vector3 is your movement direction, and the 3 values in it represent X, Y, and Z accordingly. Currently, you have put in values in X and Y but left Z as zero. Instead, just move the Y value to the Z value spot:

new Vector3(Horz * MoveSpeed * Time.deltaTime, 0 , Vert * MoveSpeed * Time.deltaTime);