amazing starts with a vowel 'a'.
so 'an' is used.
"The Last Supper" is a proper noun referring to a specific work of art by Leonardo da Vinci, so "The" is correct to refer to that specific work. However, in the sentence, "amazing work of art" refers to its quality, so we use "an" before "amazing."