The Google Maps API does not provide any routing capabilities. You can use the intention to run a google navigator (presumably on your device) or a version of Google Maps (as mentioned by Hwa Rang)
There are several guides for this outside the API, but keep in mind that google does not allow the implementation of turn-by-turn navigation; obviously, simple routing is ok.
How to add routing to Google maps
source share