My Character is not moving in unity3d, How do I get my character to move up and down and left and right?

using UnityEngine.AI;
public class WorldInteraction : MonoBehaviour
{
NavMeshAgent playerAgent;
public void Start()
{
playerAgent = GetComponent();
}
void Update()
{
if (Input.GetKeyDown(KeyCode.W))
{
print(“W key is held down”);

        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            print("S key is held down");
        }
    }
    void GetInteraction()
    {
        Ray interactionRay = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit interactionInfo;
        if (Physics.Raycast(interactionRay, out interactionInfo, Mathf.Infinity))
        {
            GameObject interactedObject = interactionInfo.collider.gameObject;
            if (interactedObject.tag == "Interactable Object")
            {
                interactedObject.GetComponent<Interactable>().MoveToInteraction(playerAgent);
            }
            else
            {
                playerAgent.stoppingDistance = 0;
                playerAgent.destination = interactionInfo.point;
            }
        }
    }
}

Here is a very simple movement script:

/* Variables */
public float speed = 3f; // 3 m/s

/**
* Put it in the LateUpdate function 
*/
void LateUpdate () {
   /* Get Axis Inputs - These are predefined so should just work */
   float x = Input.GetAxis ("Horizontal"); // A and D is pressed
   float y  = Input.GetAxis ("Vertical"); // W and S are pressed

  /* Move the transform according to inputs */
  // This is for forward, back, left and right
  transform.Translate (x * Time.DeltaTime * speed, 0, y * Time.DeltaTime * speed); 
  //  Just use the below code instead of the above if you want it to go forward, back, up and down
  // transform.Translate (x * Time.DeltaTime * speed, y * Time.DeltaTime * speed, 0); 
}