Genesis 4:10 reads out as God asking Cain, what has thou done and then God continues to inform Cain that his brother Abel’s blood whom Cain had slain cried unto God from the ground.

Did you wonder why the all-knowing (omniscient) God would have to ask Cain, what he had done? A person with a contrite and penitent heart would confess when confronted of their sin, especially if they are convicted by the Holy Spirit of God (John 16:9). And a broken and contrite spirit, God will not despise (Psalm 51:17) and if anyone who admits (confesses) with their mouth, God is faithful and just to forgive us our sins and cleanse him/her of all unrighteousness.

Points to ponder:
When God asks us “What hast thou done?”, it is not because he does not know, but because he wants us to admit (confess) our sin and when we do, he is faithful and just to forgive us our sins and cleanse us of all unrighteousness (1 John 1:9). Have you admitted. It is needed to confess/admit.

Genesis 4:10 (KJV)
10 And he said, What hast thou done? the voice of thy brother’s blood crieth unto me from the ground.

1 John 1:9 (KJV)
If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.

Psalms 51:47 (KJV17
The sacrifices of God are a broken spirit: a broken and a contrite heart, O God, thou wilt not despise.