Space is transparent. Very, very, very transparent. Even nebulas are very, very, very transparent. Nebulas only look opaque in astronomical photos because long exposures are used to gather light over hours to make them look thousands of times brighter and more visible than they are.
Thus all the opaque nebulas in Star Trek must be very, very, very tiny sections of nebulas, tiny sections with densities millions, and billions, and trillions of times greater than the typical densities of those nebulas. No doubt astronomers have never detected those tiny super dense sections of nebulas seen in Star Trek because they are so extremely tiny compared to the nebulas they are in.
So almost every where in our galaxy there is a clear view in almost every direction for millions and billions of light years. Humans have stereoscopic vision, being able to see nearby objects with two separate eyes a couple of inches apart and thus see how far away they are. If human eyes were two feet apart our stereoscopic vision could see the distances of objects 12 times farther away; if human eyes were two miles apart our stereoscopic vision could see the distances of objects 63,360 times farther away.
The principal of stereoscopic vision is the same as the principal of parallax used to measure how far away stars are. The angle to a star is measured with fantastic precision at different times 6 months apart, when the Earth is 180,000,000 miles apart on its orbit. The very tiny difference in the angles to the star gives the parallax and thus the distance to the star. Parallax can be measured accurately out to distances of several hundred light years.
If a spaceship travels to two places 18,000,000,000 miles apart it should be able to use 2017 era telescopes to measure the distances to objects hundreds of thousands of light years away as accurately as 2017 astronomers measure the distances of stars hundreds of light years away.
If a spaceship travels to two places 18,000,000,000,000 miles apart it should be able to use 2017 era telescopes to measure the distances to objects hundreds of millions of light years away as accurately as 2017 astronomers measure the distances of stars hundreds of light years away.
18,000,000,000,000 miles is about three light years. The nearest star system to Earth's solar system is Alpha Centauri at a distance of about 4.3 light years. By the time of Discovery Starfleet has visited many stars that are tens and hundreds of light years from Earth, perhaps some that are thousands of light years from Earth.
In most regions of space, especially in interstellar space outside a solar system and light years from the nearest stars, some of the brightest objects will be ordinary stars that happen to be very close but many of the brightest objects will be objects that are far away and intrinsically very bright.
So the way for a starship to find out where it is to search all around in 360 degrees for the brightest objects in various frequencies of the electromagnetic spectrum. Unless the starship is in a solar system only millions or billions of miles from a star, the brightest X ray object detected should be the great galaxy M87 millions of light years away, for example. So comparing the spectrum of the brightest X ray source should show that it is M87 and the angle between M87 and, for example, the center of our galaxy should help orient the starship and give an idea of what galactic region it is in.
And if the brightest X ray source is not a star only millions or billions of miles away, or the galaxy M87, it must be a star or other object that is only the brightest X ray source within a relatively small region of space near it. If the X ray source's spectrum identifies it as a known X ray source with a known position and known absolute brightness, its apparent brightness will show how far away the starship is from that X ray source.
Doing that with about 10 frequencies should establish the starship's exact location. Not having seen "into the Forest I Go" I can only guess that Saru is doing that but hasn't completed it yet when he tells the captain he doesn't know where they are. If the Spore Drive instantly jumps a ship from one place to another, starships that use it should be equipped with automatic telescope and computer navigation systems to swiftly measure the ship's new position.
Apparently the possibility of equipping starships with the Spore Drive caused Starfleet to upgrade the navigational systems of starships to swiftly update the position of a starship by the first season of TOS a few years later.
In "Arena" the Metrons transport the Enterprise away from their star system:
(Kirk suddenly appears in front of the crew, who all leap to their feet.)
UHURA: Captain! Are you all right?
KIRK: I don't know. I don't know. All right, everybody. Back to your posts. Let's get out of here.
(He takes his seat.)
KIRK: Mister Sulu.
SULU: It's impossible, but there's Sirius over there when it should be here. And Canopus. And Arcanis. We're. All of a sudden, we're clear across the galaxy, five hundred parsecs from where we are I mean, were. I mean
KIRK: Don't try and figure it out, Mister Sulu. Just plot a course for us back to Cestus Three.