Matthew 6:21 records Jesus' words, "For where your treasure is, there your heart will be also" (see also Luke 12:34). Most simply, this means that the things we give our money, time, and attention to are the things our hearts will care about. Practically, we know this is true. We invest in the things that matter to us; and, when we invest in something, it begins to matter to us. As always, to best understand any passage of Scripture, it is helpful to look at the surrounding context as well as related Scripture.
Jesus' statement in Matthew 6 that "where your treasure is, there your heart will be also" comes in the context of the Sermon on the Mount. After His warning not to fast for the accolades of others but instead unto God, "and your Father who sees in secret will reward you" (Matthew 6:18), Jesus says: "Do not lay up for yourselves treasure on earth, where moth and rust destroy and where thieves break in and steal, but lay up for yourselves treasures in heaven, where neither moth nor rust destroys and where thieves do not break in and steal. For where your treasure is, there your heart will be also" (Matthew 6:19–21).
Often, our impulse to store up vast amounts of earthly treasure or to seek out earthly accolades is founded in fear. But when our trust is in God, we can view our finances, time, and abilities as gifts from Him entrusted to us for His glory. We can rest secure in His love and care for us, trusting in Him rather than in fleeting things. As our hearts are inclined to God, so, too, will our treasures be directed toward things that He values. Galatians 6:7–9 encourages, "Do not be deceived: God is not mocked, for whatever one sows, that will he also reap. For the one who sows to his own flesh will from the flesh reap corruption, but the one who sows to the Spirit will from the Spirit reap eternal life. And let us not grow weary of doing good, for in due season we will reap, if we do not give up." Jesus also said, "Judge not, and you will not be judged; condemn not, and you will not be condemned; forgive, and you will be forgiven; give, and it will be given to you. Good measure, pressed down, shaken together, running over, will be put into your lap. For with the measure you use it will be measured back to you" (Luke 6:37–38). When we treasure the things God treasures, our hearts are knit to His and we reap much joy, both in this life and for eternity.