Jesus said, "Blessed are the poor in spirit, for theirs is the kingdom of God" (Matthew 5:3).
Faith is dependence upon God.
"And without faith it is impossible to please Him, for he who comes to God must believe that He is and that He is a rewarder of those who seek Him" (Hebrews 11:6).
Did Cain seek him? It doesn't seem that way.
"By faith Abel offered to God a better sacrifice than Cain, through which he obtained the testimony that he was righteous, God testifying about his gifts, and through faith, though he is dead, he still speaks" (Hebrews 11:4).
God looked with favor on Abel and his offering" (Gen. 4:4). Abel was a righteous man. He had a right relationship with God. Did Abel know about Jesus, though? I don't think so. But he was obedient to what God had revealed to him.
John Owen says, "The faith of Abel was fixed on God not only as a Creator, but as a Redeemer. . ." His faith "testified in the kind of his sacrifice, which was by faith and blood . . . . The way of atonement, which was to be by blood, the blood of the promised Seed."
Speculation? Maybe, but God accepted Abel's offering, accepted Abel's heart.
When Cain's offering was rejected, he grew angry instead of repentant. That's the difference between a righteous man and a self righteous man.
But who knows? Perhaps when Cain was an outcast, he eventually repented and became a righteous man.