In the sentence, “There are many street vendors near the entrance to the night market.”,
are the street vendors near the night market but outside the night market?
There’s not really a grammar rule to tell us; it’s more about context and state of mind.
If we’re inside the night market when we say that sentence, they are probably inside. Otherwise, we’d say “just outside the entrance”.
If we’re outside the night market, they are probably outside because we used “to”, which makes the night market itself slightly less important than just the entrance.
If they were inside, we’d probably use “of” so that the night market became more important.
Put another way, the entrance is part of the night market, suggesting that the street vendors are inside.
There are still more accurate ways to write the sentence, though. “Right/just outside/inside”, etc.
However, a lot of times the information we need to understand a sentence comes from the grammar forms the speaker did NOT use.
Taking advantage of that comes with fluency and internalizing the language.