How can I make a stickman move

I am not talking about moving animations I am talking about moving the stickman left and right with my arrow keys. Thanx in advance

By tha way I didn’t know what topic was so it is random

//You need to assign your stickman’s Rigidbody2D component via the Inspector
public Rigidbody2D rb2D;
public float speed = 5;

    private void Update()
        if (Input.GetAxisRaw("Horizontal") != 0)
            rb2D.AddForce(new Vector2(speed * Input.GetAxisRaw("Horizontal"), 0) * Time.deltaTime);      

If it moves too slowly, you can change the speed in the Inspector.