John 12 :22-32 delivers his last words to help the people realize he is who he says he is.
The people have recognized him as the Son of David, but he wants them to recognize him as more than that. He wants them to recognize him as the Son of Man who will take away the sin of the world. Then, as they recognize him as the Lamb of God, they will come to know him as the son of God.
Nevertheless, due to their culture and training, the majority of people refused to accept him as their Messiah.