1 Corinthians 2:9–10 (KJV 1900)
9 But as it is written, Eye hath not seen, nor ear heard, neither have entered into the heart of man, the things which God hath prepared for them that love him. 10 But God hath revealed them unto us by his Spirit: for the Spirit searcheth all things, yea, the deep things of God.
Paul is answering a question, Why didn’t the princes of this world know the mystery of salvation to all men? The mystery is the offer of salvation (Dispensation of grace) to all the people of the world in the Church age. This mystery was not made known in other ages but is now revealed (Ephesians 3:5). In other words, what we see today, as far as God’s grace to all, both Jew and Greek, was completely unknown to mankind in previous ages (dispensations).
As it is written Paul quotes from Isaiah 64:4 in which a plea is going out to God for Him to show the Remnant of Israel what awaits them in the Kingdom. So Paul is using the Isaiah passage to show how, in the age of grace, God’s mystery is only revealed by his Spirit. Maybe a better way to think about the mystery is that it was only available to the Spirit, but was made manifest to Paul and now revealed to us.
No one knows the deep things of God without the Spirit.