What would be the best way to implement a multi-directional "board game" movement system?

I’m pretty new to game dev, and can’t figure out how to do this, even though it is probably really easy. If you need more reference, look up some gameplay of the Wii game Dokapon Kingdom, that’s the kind of system I’m trying to create. I also made a picture to help you better understand my dilemma. Thank you all so much in advance!

enter image description here