How did the Enterprise know where to go?
Space, the final frontier. These are the voyages etc etc. It’s one of the most iconic opening lines that is read out by Captain Kirk and then Captain Jean Luc Picard (although he says no one as opposed to no Man) at the start of every Star Trek episode. Sisko doesn’t bother as Deep Space Nine doesn’t go anywhere, or it might break up and Voyager is so far lost in the Delta quadrant that it’s pretty obvious everything they come across is going to be something new to see. How does the Enterprise get around considering the vast emptiness of space. Is it just straight on until you hit Alpha Centauri then left?
What they really need is some Planning Maps from https://www.themapshop.co.uk/planning_maps_online.htm. The Voyager crew would have soon got home and Kirk and Picard could have happily penetrated the neutral zone without having to worry about any Klingon or, worse, Romulan interference.
The answer to how they knew where to go was answered in the film Star Trek: Generations. They have a big room with a huge star map called Stellar Cartography. The whole of the Alpha Quadrant is there for the crew to plan their trip and this is linked to the navigation computer. Sadly filming through space is really quite dull. There aren’t lots of nice stars flying by as the show suggests. In fact it’s just black and formless. The answer then is maths, and lots of it, plus it is way more complicated.