Photographic memory (5e Feat)
From D&D Wiki
Prerequisites: The ability to cast at least one spell
You were born with the famous skill "Photographic Memory" loved by many hated by others. But you see it as a blessing because thanks to it you can prepare for any battle.
You can change your list of prepared spells when you finish a long rest. Preparing a new list of spells requires time spent studying your spells and memorizing the incantations and gestures you must make to cast the spells: at least 1 minute per spell level for each spell on your list.