When Jesus told Martha if you believe, wasn’t he saying her spiritual insight depended on her belief, not Lazarus’s return to life?
Jesus said to her, “Did I not tell you that if you believed you would see the glory of God?” (John 11:40, ESV)
λέγει αὐτῇ ὁ Ἰησοῦς· οὐκ εἶπόν σοι ὅτι ἐὰν πιστεύσῃς ὄψῃ τὴν δόξαν τοῦ θεοῦ; (John 11:40, NA27)
Jesus did say if you believe, you will see Lazarus arise from the dead, even those who didn't believe saw Lazarus arise, but they didn't see God's glory, that is they didn't recognize God's presents in the act.
Note the differing responses to those who witnessed Lazarus coming back to life:
Many of the Jews therefore, who had come with Mary and had seen what he did, believed in him, but some of them went to the Pharisees and told them what Jesus had done. (John 11:45–46, ESV)
Note Jesus’ statement after the previous miracle John mentioned:
Jesus said, “For judgment I came into this world, that those who do not see may see, and those who see may become blind.” (John 9:39, ESV)
Before that miracle Jesus had said:
Again Jesus spoke to them, saying, “I am the light of the world. Whoever follows me will not walk in darkness, but will have the light of life.” (John 8:12, ESV)
The theme in the miracles that John recorded was that the miracles had belief as their purpose, not their cause.
Now Jesus did many other signs in the presence of the disciples, which are not written in this book; but these are written so that you may believe that Jesus is the Christ, the Son of God, and that by believing you may have life in his name. (John 20:30–31, ESV)