By (a) encouraging them to share their ideas with you with an open mind, and (b) by listening to their plans with an open mind and responding to the plans fairly
When your session started:
- You had an event for the characters to attend coming up in a half day's time. The game "had been building up to" it, so presumably the players were aware of it.
- The players proposed that their characters do something which you were unprepared for.
- You ruled that the proposed plan would be nearly impossible to achieve.
Strahd is a sandbox-style adventure. There are a lot of paths the players can take to the conclusion of the adventure. Without some DM nudges, they may wander off and do anything, or nothing. In a pure sandbox, there may be no overarching goals. In a pure linear adventure, scenarios (important locations, NPCs) are expected to be visited in a particular order. Strahd is not pure sandbox--there is a goal, defeat Strahd--but players can visit important locations or encounter important NPCs in any order they choose, or in a somewhat random order if they don't learn some things about the world.
Since Strahd is a sandbox-style adventure, you do have to be open to the fact that the players may do things unexpected, and you have to adapt to it. This can be exceedingly challenging, even for an experienced DM. However, the players have to realize that choosing to do one thing may forestall doing other things. In this case, spending time creating the forgery could threaten attending the festival. That's a choice that they have to make. Or, they could decide to go to the festival (saving your plans for that session) and create the forgery later, if it is still important to them.
More info on sandbox-style adventures, including how it relates to Strahd and other adventures published by WotC, can be found at Goals and Sandboxes.
I'm still a little sketchy on tool proficiencies myself but, I said that because they didn't have skill with this tool that the DC would be 25, it would take them a large chunk of the day to complete, and probably still wouldn't look that good if the NPC was familiar with the handwriting.
There are three parts to this:
- You set the DC at 25.
- You said it would take a large chunk of the day to complete.
- You said it still wouldn't look good if the NPC was familiar with the handwriting.
First, I understand that you were surprised by their plan. I think your surprise shows up in these reasons, particularly setting the DC at 25. Only 5 more would put it in the category of "Nearly impossible", and adding it "probably still wouldn't look good" is basically saying "I'm not going to let you do this." It is understandable that the players would have reacted in a way that suggests they thought you were just making things difficult for them. I would encourage both you and your players to try to understand each others' point of view here.
The most important part of your ruling is #2. Frankly, saying this would take a large chunk of the day is too generous. Even without referring to the specific rules, if you were to ask a random person (not even necessarily a D&D player) how long it would take to forge a journal, that is, pages and pages of handwriting, with plausible content in some kind of chronological order, that is internally consistent, doesn't contain the wrong information at the wrong time, and is physically aged appropriately (papers yellowed a little, a lot, not at all?), the answer would be weeks at a minimum.
Depending on where the characters are in Barovia, it could take them days just to get the materials they need. Did one of the characters just happen to have a blank book in their backpack?
As it so happens, there are rules in Xanathar's Guide to Everything for this, although XGtE isn't a core rulebook, so its content is basically all optional, you might not even own it, and as a new DM you shouldn't be expected to know this even if you do own it. Nonetheless, here are the rules (HT: @Linnc):
Quick Fake. As a part of a short rest, you can produce a forged document no more than one page in length. As part of a long rest, you can produce a document that is up to four pages long. Your Intelligence check using a forgery kit determines the DC for someone else's Intelligence (Investigation) check to spot the fake.
These rules aren't bad, and save you from having to set the DC. Instead, this is a contested Intelligence check. Since the characters don't have the forgery kit proficiency, they don't get to add their proficiency bonus to the Intelligence check. Whoever they give the journal to makes an Intelligence (Investigation) check to spot the fake. If the NPC is familiar with the handwriting, I would model this as advantage on the check. (Someone may not be good at spotting forgeries, but still be able to recognize their spouse's handwriting.)
This handles #1 and #3. I already addressed #2, but here is some backup in the rules for such an extensive forgery taking a long time. The characters can create a document up to four pages long during a long rest. How long is this journal? A four page journal doesn't sound very believable. Is it 40 pages? 80 pages? That's 10 days or 20 days. It is entirely plausible that forging an entire journal will take a long time.
The Real Issue
The real issue has to do with the word "secret", and what it means.
It could mean that the players are treating this is a contest, and they are trying to "win". Planning secretly is intended to throw you off and defeat your plans. If this is the case, you should talk with them. Make clear that this isn't a contest. My players often discuss their plans in front of me, because we are not opposing teams trying to defeat each other. My players know that I want to see them succeed. And sometimes I'll say things like "It occurs to you that that might not be a good idea because" of some information the characters are aware of, and the players are just forgetting or not taking into account.
In your case, if your players had discussed the forgery in front of you, when they first brought it up you could have said "You immediately realize that creating an entire forged journal will take weeks." If they want to proceed with the plan, they can, and then you can ask if they want to go to the festival before trying to acquire a blank book.
"Secret" could also mean that the players just happened to have a conversation when you were not present. Conversation between various subsets of players (and here I am included the DM as a player) has been common in many campaigns that I have been in, both as a player and as a DM. We aren't around each other all the time, and there is nothing wrong with your players doing some planning between sessions. In fact, it can make things go more quickly when the session starts. This is only problematic if they get heavily invested in an idea and can't accept that the idea won't work. But I would check to see whether this "secret" session was in fact intended as subterfuge, or was just players having fun between sessions.
In either case, you have a responsibility to listen with an open mind and respond to the plans fairly.
Big picture, encourage them to share their ideas with you between sessions, and respond fairly to their plans, as best you can even without preparation.