You can of course plan the big lines of the campaign, but the more precise you get and far ahead of the present, the more you will either lose or railroad to not lose. Both suck
I mean, you should have the current adventure planned. That’s probably ten sessions, right? If it’s a bigger dungeon it might be 20 sessions.
Do you send your players into a dungeon without designing the dungeon first? What the fuck.
You should also always have at least the beginning of the next adventure planned, because at any time, the players might decide to give up on this one and move on to the next one. This could happen because they run out of clues, or because they think it’s less important than their other goals, or because they disagree with the NPCs trying to get them to do it or for some other reason. They could also try to do the next adventure and this one simultaneously, especially in an urban campaign where everything is happening pretty much in the same place.
Stuff you planned that the players don’t do is WAY better than stuff you didn’t plan that the players do.