MoveTowards doesnt work

hello my friends, i got a problem, im trying to use the function MoveTowards but when i start my game the object doesnt move, here is my code:

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

public class EnemyPath : MonoBehaviour
{
    [SerializeField] List<Transform> waypoints;
    [SerializeField] float MoveSpeed = 1f;
    int waypointIndex=0;

    void Start()
    {

     transform.position = waypoints[waypointIndex].transform.position;
   
    }

    void Update()
    {
        Move();
    }

    private void Move()
    {
        if (waypointIndex <= waypoints.Count-1)
        {
            var targetPosition = waypoints[waypointIndex].transform.position;
            var movementThisFrame = MoveSpeed * Time.deltaTime;
            transform.position = Vector2.MoveTowards(transform.position, targetPosition, movementThisFrame);

            if (targetPosition == transform.position)
            {
                waypointIndex++;
            }
           
        }
        else
        {
            Destroy(gameObject);
        }
    }
}

Replace your
Vector2.MoveTowards
with
Vector3.MoveTowards

Even if you are working with a 2d game your coordinates are still 3D.

it worked, tnx !!!