How to find the shortest route dynamically based waypoints and their neigbors to reach a destination

so I want an ai character to access the waypoints a around themselves and find the shortest route to reach their desired destination.

74737-pathfinding-pic.jpg

A* pathfinding.

Here is a good guide to the subject.

Here is an asset for unity.

I recommend this youtube tutorial.
The full code is available in the video description and everything is explained step by step.