Boon of High Magic + glyph of warding
You assume in your question that there is no way to get 2 9th-level slots, but you can.
A 20th level wizard that the DM has granted a Boon of High Magic will be able to do this.
The Boon of High Magic says:
You gain one 9th level spell slot, provided you already have one.
Thus you would have 2 9th-level spell slots. One to cast glyph of warding at 9th-level (which then allows it to store a 9th-level spell) and the other to cast the 9th-level spell that you store into it.
Note that the 9th level spell that is cast into the glyph still has to follow all the restrictions laid out in the description of glyph of warding. Also note that Epic Boons are something entirely at a DM's discretion and only they can decide to bestow one on your character.
Spell Scroll of glyph of warding + 9th level spell
If you can get a 9th level scroll of glyph of warding you can use that to cast glyph of warding then 1 9th-level spell slot to cast the spell to store in it.
Spell Scroll + glyph of warding might also work (it will be a DM call)
If you have a Spell Scroll of a 9th level spell, you might be able to use that as the spell to store in the glyph. If the spell on the scroll is one you don't have "prepared" as a character, then (depending on how your DM defines "prepared") it may or may not work. See this Q&A for more debate on this. It is similarly unclear if a scroll of a prepared spell will work (see this Q&A). In short, ask your DM about either of these options.
As always, the 9th-level spell wish can do anything you want it to
(DM permitting) as long as you are willing to accept the risk of never being able to cast wish again. So, you could wish for a 9th-level spell stored in whatever manner you wanted. And, barring any DM twisting of the wish you would be able to do so using only 1 9th-level slot.
Note that you must fully cast wish into the glyph so the cast must make the wish, decide what effects they want, and suffer any stress required just like normal.