How would i create a branching path between multiple points?

I have a 2D node map which contains data about what will be in each node (GameObject, isWalkable, neighbours etc). I want to create a path starting from the bottom of the map heading to the top, where the path will always reach certain points on the map but can branch off if it needs to. I’m struggling to find the right algorithm to start with to get the functionality i want. Can anyone give me any directions?

Thanks

A*

Here is my implementation of it:

Note, a BinaryHeap is an automatically sorted collection. The point is that it’s sorting by the summed weight of each node.

You can path to any given node that you desire. If you want to branch to a new target, just recalculate a path with the new target.