A sphinx is a mythical creature with the body of a lion and a human head. They are usually associated with royal tombs and the most famous one is at Giza. Kings made these structures for reasons that are still debated, though most suspect they are related to religion. The oldest known sphinx was found near Gobekli Tepe and dates to 9,500 BCE.
In ancient Greek culture, the sphinx features in Sophocles's Oedipus the King as a cruel being who gives riddles. If people cannot solve the riddle, they are killed.
In the ancient world, Ozymandias is an alternative name for the Egyptian pharaoh Ramesses II. Percy Bysshe Shelley wrote a sonnet about it. It says:
I met a traveller from an antique land Who said: "Two vast and trunkless legs of stone Stand in the desert. Near them, on the sand, Half sunk, a shattered visage lies, whose frown, And wrinkled lip, and sneer of cold command, Tell that its sculptor well those passions read Which yet survive, stamped on these lifeless things, The hand that mocked them and the heart that fed: And on the pedestal these words appear: 'My name is Ozymandias, king of kings: Look on my works, ye Mighty, and despair!' Nothing beside remains. Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away."
Both the sphinx and Ozymandias are now deceased. The things they boasted of are now gone. Their pride is in vain. That is the point of the sonnet. So, what they have in common is they are only relics of a past proud culture.