How do I go about adding basic pathfinding to my enemy?

I have a top down 2D game, and I need the enemy to go from its current position to a different one (I know the location of where it needs to go). Currently, I rotate the enemy to face the new position, and then make it go forward. However, if there’s a collider in the way then of course it will just bump into it and get stuck. How do I get it to go around colliders and add some basic pathfinding? Any advice is greatly appreciated!

A* is an algorithm designed to get from point a to b the quickest while considering obstacles in the way, lucky for us this algorithm is available in tools like [this][1] one and all the complicated code is taken care of and we just plug in the objects and variables, even luckier there is a free version of it on the [website][2] that can calculate shortest distance and avoid obstacles in 2D; for a top down game like you are talking about it works great.


I have even found a video on youtube that goes through the entire process of downloading it and importing from the website to building a quick graph that detects obstacles:


[1]: A* Pathfinding Project Pro | AI | Unity Asset Store
[2]: A* Pathfinding Project