2D platformer how to program ground enemy following player

im making a platformer and i cant figure out how to make a ground enemy follow me well not just follow but also find its way to me

You can use A* pathfinding:

https://arongranberg.com/astar/

i already tried that when i tried to do it with a video but the video only had it for flying enemies not ones that cant fly