When John tells us “do not love the world”, the main thing he has in mind is not the possessions in the world. Rather his emphasis is on not falling in love with the world’s attitudes and and mindsets. To love the world is to love what is opposed to God.
1 John 2:15-17 – Do not love the world or the things in the world. If anyone loves the world, the love of the Father is not in him. 16- For all that is in the world–the desires of the flesh and the desires of the eyes and pride of life–is not from the Father but is from the world. 17- And the world is passing away along with its desires, but whoever does the will of God abides forever.