The world is full of beautiful things, and we'd like to have many of these things. These treasures promise us a certain amount of satisfaction and security, but Jesus says that it will do neither in this life.
Instead, Jesus says you must first settle your eternal security vs the temporal (this life) security. This should be a priority as you never know how long your life will even be, so do not delay in having a relationship with Jesus. When he says not to store up treasures on earth, he means hoarding treasures for yourself (selfishly keeping good things to yourself, and having it as the main standard for being successful). The treasures in heaven, are the good deeds you do and generosity you invest in others; we will take our character with us to heaven, not our earthly wealth.
What you treasure will affect your outlook on your life. If your eyes/heart pursues idols, then your goals will be focused on those things and you'll be lead astray from God. Example, if you love money above all else, you will base your judgment of people on how much they have and not see who they really are. You will end up being jealous of those with more and you'll be miserable. But if your eyes are on God and his teachings, then earthly treasures will not deceive you. Wealth will not be your master but your servant; there are wealthy believers, and they use that wealth to bless others.
Sometimes the pursuit of wealth will lead in an opposite path from God's calling on your life. Sometimes God calls us to be a witness, to show that we can be a blessing even without wealth. Don't let these treasures be a distraction or temptation. The Lord will challenge us to see whether He is the one we love above all else.