That depends on why it isn't working.
Try going into Settings > Apps, finding Maps and checking whether it is set as the default app for any actions. If it is, clear that default and it should prompt you next time to ask what app you want to use. You can then choose a different app, and usually if once your preferred app is the first choice (i.e. it's what you used last time) you can also choose to make that the default.
In most cases that works, and it works on my phone for things like address links in my contacts. But you may encounter things which are hard-coded to open a particular app (a web link that's explicitly a Google URL would be something that may give you no choice, unless Here has told the operating system that it can handle those links).