I've been asked a number of times over the years why the vast majority of Jews didn't believe that Jesus was the messiah during his lifetime. These questions are always asked as if it were a reason for us to doubt that Jesus is the messiah.
I want to share three reasons I think most Jews did not believe Jesus was the messiah during his lifetime. There are probably other reasons, but these jump out at me.
First, Jesus was not the only person in the first century who made himself out to be the messiah. There were multiple people who either made overt claims to being the messiah or else took actions suggesting a messianic claim. Josephus lists about a dozen of them. There's a section in L. Michael White's book, From Jesus to Christianity, where he discusses some of them. I'd list a few, but I don't have the book with me. I may update this post later. With multiple people all claiming to be the messiah, it's natural to be skeptical of any particular claim.
Second, Jesus did not fulfill all the prophecies the messiah was expected to fill during his lifetime. Jesus didn't re-unite Judah and Israel, he didn't re-establish the throne of Israel or accomplish national sovereignty, he didn't usher in a era of peace and prosperity, etc. Unless somebody has fulfilled all the messianic prophecies, there'll be reason for doubt. We Christians believe Jesus rose from the dead and that he will fulfill all the prophecies, but it's understandable why a Jew in the first century would be skeptical until all the prophecies had been fulfilled. The fact that Jesus died without fulfilling the prophecies would've been the nail in the coffin if not for the resurrection.
Third, most of us have a natural skepticism toward lofty claims that people make about themselves. First century Jews were no different. When somebody makes a lofty claim about themselves (e.g. that they are the answer to prophecy, or they are God's chosen king), we expect proof before we buy into such claims. Even John the Baptist, who declared Jesus to be the lamb of God, later questioned whether he was the one to come or whether they should expect another (Matthew 11:2-3). The gospels report that multiple people asked Jesus for a sign to establish his credentials. Most of us would probably dismiss somebody out of hand without even asking for a sign because, let's face it, we think people are crazy when they say the kinds of things Jesus said about himself. That's why "lunatic" is part of C.S. Lewis' famous trilemma.
The fact that Jesus was the messiah was never, by itself, a guarantee that everybody would recognize it. For an average Jew living in the first century, there was plenty of room for doubt. In fact, I'll add a fourth reason - most Jews in the first century probably never even saw Jesus or heard him speak. At most, they might've heard a rumor about him. It would not surprise me if a large fraction of Jews never even heard about him during his lifetime.
Since there's no reason to expect that most Jews would've believed in Jesus during his lifetime even if he had been the messiah, the fact that they didn't believe in him is no reason for us to doubt that he is the messiah.