“God is love” (1 John 4:8) On one hand God is loving, so He doesn’t want to punish us.
“God is just” (Exodus 34:7b) on the other hand God is just, which means He must punish our sin.
God’s love for us doesn’t depend on what we do for Him. He wants to have a relationship with us. But no matter how much He loves us and doesn’t want to punish us, He cannot ignore our sinfulness.
God solved this tension in the person of Jesus.