Cain talked with Abel after this meeting with God. The exact words weren’t deemed important enough to record. Cain’s reaction - killing his brother – is what’s important. Ultimately, Cain killed Abel because of Abel’s testimony of grace - Cain’s works were evil, while his brother’s were righteous. (1 John 3:12) There was also the sin of jealousy.
Covetousness - wanting what others have - is a typical human sin. It can spiral into envy, which can then turn into jealousy. (While they are sometimes used as synonyms, I see them as different. When one is envious, one wishes one had what others have. But, they don’t necessarily want those who do have more to suffer. Jealousy, to me, only happens when the person who doesn’t have something hates the one who does.)
That slippery slope was part of what led to the first murder. Some time passed - again, we don’t know how much. Cain allowed his anger to grow. This is why it’s so important that we never let the sun go down on our wrath. (Eph. 4:26) We, as humans, are going to be angry. But, we must never let anger cause us to sin. We must solve problems in a Godly manner. Cain’s killing of Abel may have come in a moment of passion. Or, it may have been premeditated. Whether or not he planned it out, though, he committed a horrible sin. God knew exactly what would happen if Cain didn’t turn to Him for cleansing from sin, instead of relying on his own works.