The lines in "Ozymandias
" to which you refer contain both euphony and cacophony.
Nothing beside remains: round the decay
Of that colossal wreck, boundless and bare,
The lone and level sands stretch far away.
Note the euphonic words and phrases: "boundless and bare," "lone and level," and "sands stretch." All the vowel sounds are soft and rather elongated; even the "a" sound in the last 5 or 6 words serve as a final note of euphony. The use of euphony is useful here both as a poetic device and as an emphasis on the great irony
of the poem--what was once grand and imposing and intimidating and great has now been laid low. The smoothness of the euphony draws us a picture of the vast empty stretches of sand surrounding this broken monument to greatness--an area once covered with people and movement and energy and productivity. Now it stretches "lone and level," "boundless and bare."
Cacophony isn't as present in the lines. In fact, there are only three words which could be considered cacophonic: "decay," "colossal," and "wreck." Not surprisingly, these are all words used to describe the cracked and crumbling monument. It's a perfect fit for the harshness of cacophony to be used to describe the fallen tribute to greatness. This, too, suits the irony of the piece. Only three words in the last three lines are even spent on the once-glorious statue; the rest are reserved for the bigger picture--a wasteland of empty desert.
Really good question!