What do the rules say?
There doesn't appear to be an official rule, so "Rulings over Rules" would apply - it's sometimes annoying how often it comes up, but for 5e at this stage it would seem "it's up to the DM."
Even without direct rulings for this, and remembering that drawing inferences from similar existing rules and imagining them as RAW seems to make Jeremy Crawford chuckle, we can see that changes to ability scores can have immediate and considerable effects, at least in the case of CON/maximum hit points -
if you're 7th level and some effect lowers your Constitution score so as to reduce your Constitution modifier by 1, your hit point maximum is reduced by 7. - PHB 177
What ruling should I make?
That said, there are reasons to rule either way. As discussed in Carcer's answer and its comments, there is nothing in the rules to explicitly state that you'd lose them, and the example of the spell Feeblemind only really serves to highlight that an effect that reduces your Intelligence to 1 also has to state that you lose the ability to cast spells - though, to be fair, it would have to state this anyway; as a player with INT 1 and WIS 18 could still be a very effective druidic caster RAW.
However, PHB 177 says "Intelligence measures mental acuity, accuracy of recall, and the ability to reason", and on 173, literally "memory" - which would be why you are able to "memorize" more spells based on your INT modifier.
You can change your list of prepared spells when you finish a long
rest. Preparing a new list of wizard spells requires time spent
studying your spellbook and memorizing the incantations and gestures
you must make to cast the spell: at least 1 minute per spell level for
each spell on your list. - PHB 114
If your memory has been damaged, it is reasonable to assume that certain complex things you can only remember with careful and regular study might become... well, corrupted. If we decide that this means that you lose a spell from your prepared list, there are three ways we could resolve this:
1. Lose the most complex or recently learned spell. The highest level spell, or one that has only recently been added to your spell book may be a reasonable option. This spell has seen less practical use, or is just too complicated for you to keep track of in your dulled state.
2. Lose the least interesting spell. This would basically give the player a choice of which spell they'd lose, with the justification being "the spells I'm most interested in come to mind often. The ones I am less keen on get less focus, and therefore aren't as fresh in my mind.
3. Lose a random spell. There are dice. It's a thing.
Does the wizard even know they've lost a spell?
Unless the spell lost is the most interesting one, it's possible that the character doesn't even know that they've lost it. Based on the lack of RAW either way it's likely the player didn't think about it, and there's no rule that you have to tell them.* Even if they do think about it (or you tell them) if either of you decide the character wouldn't notice, that makes this meta knowledge.
Wizard spells are described as incredibly complex and intricate. Perhaps all that was forgotten was a small element. If you decide the character doesn't realize, determine as the DM (secretly) which spell has been forgotten, and then if the character attempts to cast it, describe the spell failing. For example:
Player: I cast Fireball at the centre of the group of goblins.
DM: You trace your fingers through the air, and a faint red mist begins to form. You begin uttering the incantation as you have so often before, but suddenly you get stuck. It's like the arcane words just aren't quite right, and you can't remember what they should be instead. The red mist fades, and there is no effect.
When the player goes to prepare their spell list next you may need to remind them that they can no longer prepare as long a list; especially if they do so before they attempt to cast the forgotten spell, if you decided they lost it on the spot and that you wouldn't alert them.
*Though if you feel it may upset things so much that it damages the enjoyment for one or more players... most people play games for fun, IMHO.
A decent compromise might be, at the point that their INT goes down, to tell them that they "have that annoying feeling that you've forgotten something, maybe the iron is still on, or you've left your lunch at... the castle?"
You could also have them roll a perception check to see if they notice, and/or a history check or arcana check to identify which spell they've forgotten. You could choose to do these regardless of whether the player thought to ask if they'd forgotten any spells.