In John 3:1-15, Jesus is speaking to Nicodemus about the need for a person to be “born again”. When Nicodemus ask Jesus, “How could these things be?” Jesus basically said, “You are a teacher in Israel and still you don’t know this?” Since The Mosaic / Levitical laws emphasize obedience to the 10 Commandments and their derivatives, what could Nicodemus have studied that would have helped him understand spiritual rebirth?
It’s important to remember that the Lord could not have rebuked Nicodemus unjustly. There had to be a way he could have known. The two most prominent places would have been Jeremiah 31:31-34 where the phrase New Covenant originates, and Ezekiel 36:25-27 where the Lord promised to take out their old heart, give them a new one, and put His Spirit in them. This would logically require dying and being born again.