Answer:
Therefore, just as through one man sin entered the world, and death through sin, and thus death spread to all men, because all sinned. (ROMANS 5:12).
ROMANS 3:23, ROMANS 6:23, JOHN 3:16
Sin is an action or thought that is in disobedience to God. God created all the heavens and all the earth. He created birds, dinosaurs, the oceans, the earth, the stars, everything including you and me and all people! But He did not create sin.
When God created people, He knew we would disobey Him—though He created Adam and Eve with the potential to sin. And when Adam and Eve sinned (disobeyed God) in the Garden, the Bible tells us that in Adam the whole human race sinned and fell. Now this is the really amazing part! God uses our sin to show how loving, just, and merciful He is to us. You see, it is because of our sin that God stepped into history to be a man—Jesus—to die on the cross, to be raised from the dead, and to be saved from the punishment for sin. God shows us how much He loves us by forgiving our sins and giving us a way to get to heaven.
If we believe in Him and trust Him as Lord of our lives, we will go to heaven because Jesus took the punishment for our sin. So, we are to blame for sin not God. But because of our sin, God wants to save us and show us the most amazing love He has for us. He is a wonderful God!
Source: https://answersingenesis.org/kids/creation/why-did-god-create-sin/