Sword of Spirit
Legend
Also, so far as I know, there's no way to put a 9th-level spell in a Glyph of Warding. It would require a character to have two 9th-level spell slots, which no class has thus far.
There's an epic boon in the DMG that grants an extra 9th level spell slot...
The way I read the spell, it takes only one spell slot to create a Spell Glyph, to quote the text:
"You can store a prepared spell of 3rd level or lower in the glyph by casting it as part of creating the glyph."
So, I don't see why a 9th level spell can't be put in a glyph as it should expend only one spell slot to create the glyph.
That particular technique's logic should also allow casting a spell that you don't know, isn't on your class list, and you aren't high enough level to cast, since it doesn't specify that you have to meet any of those requirements in that sentence.
Using a spell slot is a basic part of casting any non-cantrip spell. It would have to be explicitly stated that it does not use a spell slot in order for it to not apply.
But there's an epic boon...