John 3:16 means that God's love for the world is shown in giving his only Son, so that everyone who believes in him may not perish but have eternal life.
The verse comes inside Jesus' conversation with Nicodemus about new birth, heavenly testimony, and the Son of Man being lifted up. John is not giving a detached motto; he is explaining why the Son came and how life is received.
This verse is often quoted on its own, but its context keeps love, judgment, belief, and eternal life together.
16For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.