According to the Awakened Spellbook feature of the Order of Scribes school of magic presented in Tasha's:
When you cast a wizard spell with a spell slot, you can temporarily replace its damage type with a type that appears in another spell in your spell book, which magically alters the spells formula for this casting only. The latter spell must be of the same level as the spell slot you expend.
So, if my Wizard is 7th level and has Phantasmal Killer not prepared, but in my spellbook, and I cast Fireball using a 4th level spell slot, I can deliver a 9d6 Fireball that deals psychic damage as many times as I have 4th level spell slots available?