Take a spin with me to Genesis 4:3-5.
And in process of time it came to pass, that Cain brought of the fruit of the ground an offering unto the LORD. And Abel, he also brought of the firstlings of his flock and of the fat thereof. And the LORD had respect unto Abel and to his offering: But unto Cain and to his offering he had not respect. And Cain was very wroth, and his countenance fell.
Clearly, God didn’t approve of Cain’s veggies but did approve of Abel’s sheep. Why is that?
Cain was trying to win favor with God by working for it. Recall that Isaiah 64:6 calls our righteousness “filthy rags.” Although our works can demonstrate and exercise our faith (James 2), the works can’t save us (Romans 3:23-31). Only God’s grace can get save us (Ephesians 2:8-9). Cain was relying on the effort of his hands so God would be pleased with him. That won’t work. None of us can be perfect enough to please a holy, righteous God.