YHWH had regard for Abel and his offering, but for Cain and his offering he had no regard. -- Gen 4:4-5and
By faith Abel offered to God a more acceptable sacrifice than Cain, through which he was commended as righteous, God commending him by accepting his gifts. -- Heb 11:4Hebrews tells us that it wasn't the offering that was acceptable or not, but the person, and that Abel made his offering by faith, and that the acceptance of the offering was to show that the person was acceptable. The converse of that is that the non-acceptance of an offering shows that the person is not acceptable.
We see from this point on that Cain gets angry, kills his brother, has an attitude with God, whines about his punishment, and raises another kid down the line with more problems than he himself had.
The problem wasn't Cain's offering; the problem was Cain.