With Google maps and Google street view, you can get a lot of detail about the layout of a city and just what it looks like at any given point that would have been very difficult ten or twenty years ago.
That said, sure, if you set a story in a place that you have never been to, it is very likely that you will make mistakes about things that you didn't even think to question. This could range from small things that would have a minor impact on the story, like, "You say the hero ordered apple pie in the restaurant, but in our culture apples are considered bad luck and it would be a VERY unusual restaurant that would serve apple pie", to something that would undermine your whole plot, like "Your hero is black -- that's been very clear throughout the series -- and now you say he is a spy in this city? But there are no black people in our country, so any black person coming here would stand out from 100 miles away and it would be almost impossible for him to function as a spy."
If you use a real city, I wouldn't worry about getting tiny details wrong. Like if you say, "He walked past the coffee shop on Third Street", and there is no coffee shop on Third Street, very few readers would notice or care. Even if someone said to himself, "Wait, Third Street? There's the men's clothing store, the Thai restaurant, the auto parts store ... there's no coffee shop on Third Street!", he'd probably just assume that you put one there to make the story work and brush it off. People will accept fictional details of that sort just like they accept your fictional characters: No one is going to say, "What? The writer says that hero lives in this city and he is named Fred Stover? But I just checked the phone book and there's no one in this city by that name!"
But fundamental things about the nature of the city you need to get right. Like if you set the story in New York and say that most of the people work in the oil fields surrounding the city, or you set it in Chicago and talk about the harsh winds blowing in from the desert, that would be really jarring and unbelievable. (Unless the story is set in the future and you explain how such a radical change came about.)
If you make up a fictional city, you free yourself from a lot of that trouble. You can make the city almost anything you like, and no one can say it's wrong, because you just made it up. If possible I'd make the exact location vague. Like don't say, "Twelve and a half miles south of New York along the coast", just say "in New Jersey" or even "along the Atlantic coast" and somewhere else mention "in the north", etc. That way you don't have to worry about a reader saying, "Hey, there's no island off the coast there" or "but why didn't the hero go to Smithtown for that, that would be right across Highway 90, wouldn't it?"
Of course a fictional city in the U.S. would have to have a culture at least generally consistent with the rest of the U.S., or you would have to explain why not. Like if you set a story in a fictional U.S. city and then mention that the hero is marrying a certain woman because this was arranged by their parents, or that the hero rides a rickshaw to work every day, you couldn't just toss that in casually, you'd have to provide some explanation.
Seemingly small errors CAN be jarring. An example that occurs to me: I once saw a movie where a character casually mentions that she grew up in Lima, Ohio. It wasn't a big part of the movie, they were just trying to toss in that she grew up in this small town before moving to the big city. But at the time I lived in Ohio, not far from Lima. And the character in the movie pronounced it "Lee-ma", like the city in Peru. People who live there pronounce it "Lie-ma", like the bean. It sounded very weird to me. Like doesn't she know how to pronounce the name of her own home town?
On a more significant point, consider the movie "Raiders of the Lost Ark". They depict the Germans as apparently being in control of Egypt. German soldiers freely travel around the country, German officials are dictating to people, etc. But at the time this movie was set, Egypt was controlled by the British. I'm not sure if the writers thought that Germany controlled Egypt, or if we are supposed to think that the Germans could do all this right under the noses of British authorities somehow.