By RAW, They Retain The Abilities They Had When They Died
As @Joakim M. H. states, there is no special rules for preparing spells that suggests any sort of time limit on retaining prepared spells - but to be sure, we should look at the text for all the spells that bring a creature back to life as well.
There are five different spells to bring a creature back to life in DND 5e - Revivify, Raise Dead, Resurrection, True Resurrection, and Reincarnate.
Revivify
You touch a creature that has died within the last minute. That creature returns to life with 1 hit point. The spell can't return to life a creature that has died of old age, nor can it restore any missing body parts.
There is no special mention of losing any abilities when revivified, and given the short duration this spell has to take effect, we would not expect any special circumstances either.
Raise Dead, Resurrection, True Resurrection
All three of these spells are virtually the same, except for the duration a creature can be dead, whether or not any body parts are required or restored by the spell, and any additional effects it has on the caster or target, and whether or not the creature can be undead at the time.
The text varies on these details and others, but in no place does it suggest any loss (or gain) of abilities once had before death.
Reincarnate
Reincarnate is a special type of resurrection that provides an entirely new body for a dead creature. And it features the following text:
The reincarnated creature recalls its former life and experiences. It retains the capabilities it had in its original form, except it exchanges its original race for the new one and changes its racial traits accordingly.
Emphasis mine - explicitly, all capabilities the creature had before death are retained.
There Are No Other Rules
You might be tempted to think that because the other four types of resurrection do not explicitly call out retaining capabilities that they do not allow the wizard to retain their prepared spells - but there are no secret rules - a spell does exactly what it says, no more and no less.
And since we have reviewed both the rules of prepared spells and all five spells that return a wizard to life, we can conclude that there are no other rules saying a wizard can prepare new spells after being dead for more than 24 hours (or loses prepared spells after 24 hours - dead or alive). So the prepared spells the wizard has remains the same, regardless of passage of time or status of life.