For where your treasure is, there will your heart be also.
If you read verses 19 and 21 you will see the foolishness and futility of storing up treasures on earth where everything will be destroyed. When we value something so highly that we think of it as a “treasure”, then all our love and affection is poured into that thing. And so our thoughts and energies and affections should all be centered in heaven, not on earth.