Check out example codes for "unity 2d top down movement". It will help you in understanding the concepts better.

Code Example 1

public float Speed = 5f; 

private void Update()
    {
        var input = new Vector3(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"), 0);
        Vector3 velocity = input.normalized * Speed;
        transform.position += velocity * Time.deltaTime;
    }

Code Example 2

public float Speed = 5f; 

private void Update()
    {
        input = new Vector3(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"), 0);
        Vector3 velocity = input.normalized * Speed;
        transform.position += velocity * Time.deltaTime;
    }

Learn ReactJs, React Native from akashmittal.com