I need help with player animation.

alright so i am really new with coding and using unity, but i got a player movement script. the problem is that i dont know how to make animations when going left right up down and idle. im making a 2d topdown btw. here is the movement script i have:

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

public class NewController : MonoBehaviour
{
public float MoveSpeed = 5f;
public Transform movePoint;
public LayerMask StopMovement;

void Start()
{
    
    movePoint.parent = null;
}

// Update is called once per frame
void Update()
{
    transform.position = Vector3.MoveTowards(transform.position, movePoint.position, MoveSpeed * Time.deltaTime);
    
    if (Vector3.Distance(transform.position, movePoint.position) <= 0.05f)
    {

        if (Input.GetAxisRaw("Horizontal") > 0.5f || Input.GetAxisRaw("Horizontal") < -0.5f)
        {
            if (!Physics2D.OverlapCircle(movePoint.position + new Vector3(Input.GetAxisRaw("Horizontal"), 0f, 0f), 0.2f, StopMovement))
            {
                
                movePoint.position += new Vector3(Input.GetAxisRaw("Horizontal"), 0f, 0f);
               
            }
        }

        else if (Input.GetAxisRaw("Vertical") > 0.5f || Input.GetAxisRaw("Vertical") < -0.5f)
        {
            if (!Physics2D.OverlapCircle(movePoint.position + new Vector3(0f, Input.GetAxisRaw("Vertical"), 0f), 0.2f, StopMovement))
            {
                
                movePoint.position += new Vector3(0f, Input.GetAxisRaw("Vertical"), 0f);
            }
        }
        
    }
   
}

}

Any help would be gladly appriciated!

Brackeys has a great beginners Tutorial for your case:

Brackeys - 2D Animation in Unity (YouTube)