By Andrew or by heaven?
Matthew 16:17—”Did Simon Peter find out that Jesus was the Christ by a revelation from heaven or by Andrew (John 1:41)?”
The obvious interpretation is that Simon Peter maintained skepticism about Jesus being the Messiah even after Andrew suggested it to him; he didn’t believe Andrew. Later, as he got to know Jesus, it was revealed to him by God in his heart and he accepted for himself that Jesus was indeed the Messiah. Peter provides a wonderful example of someone who, through honest searching, came to accept Jesus as the Appointed Messiah of whom so many prophecies spoke.