Romans 6:1–23 says we are not slaves to sin. Cain too can fight against his wrong inclinations.
God teaches a strategy in the battle with sin:
A person can get angry and look down in desperation. Choose to do well, lift your face up, to God. Do not fight in your own strength.
Remember: giving in to evil puts you in the power of sin.
Fight sin and overcome. That is possible, by looking onto God.
Cain gives God no (notable) answer. He does something else. See Genesis 4:8.
7 If you do well, will you not be accepted? And if you do not do well, sin is crouching at the door. Its desire is for you, but you must rule over it.”