Let us start from the beginning. God the Father (Deuteronomy 6:4, 32:6) created the heavens (universe) and earth in the beginning (Genesis 1:1) through His fully divine begotten (one of a kind) Son (John 3:16) Jesus Christ (John 10:30, 37-38, 14:9-11) who is the eternal Word and Wisdom of God (John 1:1-3, Psalm 119:89-91, Proverbs 3:19 comp with 8:22-30, Jeremiah 10:12, 1 Corinthians 1:24) by whom the Father spoke the world into being (Genesis 1:3, Hebrews 11:3). God declared His creation to be very good (Genesis 1:31) and He made both male and female in His image and likeness to have dominion over creation (Genesis 1:26-28). Adam and Eve (the first humans) were placed in a garden of Eden with food available from the trees of the garden (Genesis 2:8-9, 21-23) and there was only the tree of knowledge of good and evil which they weren’t allowed to eat from lest they should die (Genesis 2:16-17). The serpent who is the Devil (John 8:44, Revelation 12:9) tempted Eve to sin (break God’s commandment) by eating of that tree and she took of it with her husband Adam (Genesis 3:1-6). As a result of their actions spiritual death (loss of everlasting life) resulted leaving them separated from God (Genesis 3:22-24, Proverbs 14:11-12, Isaiah 59:2, Ezekiel 18:24, Romans 6:23). Like Adam and Eve we have all sinned which resulted in loss of everlasting life also for us (Ezekiel 18:20, Hosea 6:7, Romans 5:12).
Enmity (hostile opposition) between the Devil, Eve, his seed (Beelzebub Prince of Demons) and her seed to come (the Lord Jesus Christ) was also to break out (Genesis 3:15, Luke 22:2-4, 1 John 3:8). The hostile opposition continues on as anyone who is of the Devil belongs to him and his seed (John 8:44, 12:31, Matthew 12:24-27). It is for this cause that the Devil is also the god of this world which lies in sin (Matthew 4:8-9, 2 Corinthians 4:4, 1 John 5:19). Anyone who is of Eve are those born into the world (Genesis 3:20) and anyone who is of Jesus Christ are those who have become children of God by present faith/trust in Him also being baptised/washed into Christ (John 1:12-13, Galatians 3:16, 26-29). One day all of us who have partaken in this hostile opposition/spiritual war (Ephesians 6:12) shall be judged by God for our actions (Matthew 12:36-37, Romans 2:6). In that day we shall either experience everlasting (ages of ages) punishment in fire prepared for the Devil with his demons or we will experience everlasting (ages of ages) life prepared for those who are righteous (Matthew 25:31-46).
Will we inherit or possess everlasting life? Jesus Christ said that to enter into life we should keep the commandments of God (Matthew 19:16-17). This helps us to enter in because we are drawn further away from separating from God (a consequence of not having everlasting life), but keeping the commandments cannot make us righteous because all of us have broken God’s commandments which is summed in the two greatest commandments: Love the Lord your God with all that you are and love people as yourself (Matthew 22:37-39). When we fail to keep one part of the law (commandments) we are guilty of them all (James 2:9-10) because we violated the greatest commandments which all the others hang upon.
So then how can we be made righteous? Jesus said that if we would believe on Him and God the Father we would have everlasting life (John 3:16, 5:24, John 17:3) thus the consequences of sin (loss of everlasting life/spiritual death) would be diminished. Faith in the Lord Jesus and God the Father is righteousness (Genesis 15:6, Habakkuk 2:4, Romans 14:23, Hebrews 11:6) with good works (Matthew 19:16-17, James 2:14-17, Galatians 5:6) because the opposite of this is no faith, no good works, no everlasting life and therefore only sin/unrighteousness remains (1 John 3:4, 5:17). Faith with good works can lead us to righteousness but it can never take away our sins, so what can take away our sins?
Jesus Christ spoke of how He would give His life as a ransom for many (Mark 10:45) and be given to hands of sinners (Mark 14:41). He does this by surrendering Himself over to Satan which Satan arranges through Judas Iscariot (Luke 22:3, 47) who betrays Jesus to the multitude of sinners (chief priests, captains and elders) who are all under the power of darkness/demonic power (Luke 22:52-53, Matthew 16:21-23). Jesus surrenders willingly (Matthew 26:52-57) knowing what the scriptures prophesied about this (Matthew 26:24, Luke 22:22, John 17:12) and by giving Himself over to Satan He would die to take away the sin of the world (John 1:29, John 4:42, 11:51-52). Satan through the multitude of sinners demanded that Jesus should be crucified on a cross unto death (Matthew 27:22-25).
Jesus spoke of how His blood would be shed for the remission (forgiveness) of the sins of many (Matthew 26:28) because it was by the means of His blood (life) being shed unto death that atonement without defect (perfect covering) for sins could be made (Leviticus 17:11, Hebrews 9:22, Exodus 12:1-6) because He was without sin (1 Peter 1:18-19). Satan knowing the consequences for sin (loss of everlasting life) presumably thought that Jesus would be separated from God if Jesus bore people’s sins upon Himself (Isaiah 53:5-6, 1 Peter 2:24) which left ownership of Him to Satan. But it was not possible that spiritual death/loss of everlasting life should hold Jesus because of the divine life that was in Him from God the Father (John 1:4, 5:26, 10:17, 11:25, 14:6, 14:28, Acts 2:24-32). The inseparability of God the Father and Jesus Christ is the reason why He never experienced separation from the Father but only physical death at the hands of the Romans for the sins of the world (Hebrews 2:9, 1 John 2:2). It was by this oversight of the Devil presumably in his pride (1 Timothy 3:6) that Jesus Christ defeated the Devil and rose from death on the third day (Mark 16:6, Luke 24:46, 1 Corinthians 15:4) so that the Devil would no longer hold humanity in spiritual death/loss of everlasting life (John 11:25-26, Romans 6:9-11, 1 Corinthians 15:21-22, Hebrews 2:14-15, 1 John 3:8).
So this is the summary: By the Lord Jesus Christ ransoming Himself to Satan He through His blood being shed unto death has brought forgiveness of sins on a cross where He was crucified. And by His resurrection from death we may have everlasting life, no longer being held in spiritual death/loss of everlasting life by the Devil. If we would repent (change our mind) from our sins to God (Luke 24:46-47, Acts 3:19, 5:30-31, 20:21) and place our trust in the Lord Jesus Christ (Acts 10:43, 16:31, 20:21, Romans 1:16-17, 1 Corinthians 15:1-4) we shall be saved from sin, death (John 3:16, 5:24, John 17:3) and the Devil with his seed (John 14:30, 16:33). Then let us then follow Jesus to the end (Matthew 16:24-25, 19:29, 24:13, John 14:6) and then our salvation will never be lost (John 10:27-29).