John 3:16 “For God so loved the world”.
That is what the English translation says, but it is not what the apostle John wrote. Here is what John wrote.
“For God so loved the order”.
2889 kósmos (literally, "something ordered") – properly, an "ordered system" (like the universe, creation).
One author has used the word society. The world is full of ordered groups or societies that are good and evil. The word itself is neutral. The order can be good or evil. The answer to what God loves is in the verse itself.
“For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.”
John 3:16 references a promise to send a savior so that those who believe in God should not perish. So we know that the part of the world or order or society that should be saved are those to whom the promise was made.
John 3:16 does not teach that God loves the entire world. It teaches that God loves an ordered group or society in the world. It is that group, those who believe in Him that God provides eternal life.
The bible is full of little details like this. It is these little details that give truth and understanding to all of scripture. One can get by without knowing some of these. Some are fundamental to the truth and understanding of scripture. The bible has an entirely different understanding. when one finds many of these details. Many debates happen because someone has found one of these details of which others are unaware. All of the details are important.