how to make a 2d character move in unity 2020

Code Example - how to make a 2d character move in unity 2020

                
                        using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovemeny : MonoBehaviour{

    public float speed;

    private Rigidbody2D rd;

    void Start(){
        rb = GetComponent<Rigidbody2D>();

    }
    void Update() {

        Vector2 moveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"))
        moveVelocity = moveInput * speed;
    }

   void FixedUpdate(){

        rb.MovePosition(rb.position + moveVelocity * Time.fixedDeltaTime);

    }

}