The Psalmist asked for a united, singular affection to follow God. The heart is the seat of our affections. It’s the emotional source from which everything springs. He asked God to bring each part of his affections together so that he would be laser-focused on the one true God.
When Jesus was asked which was the most important commandment, He replied with no hesitation: “Love the Lord Your God with all your heart, all your soul, and all your mind.” (Matthew 22:37). This first and greatest commandment was given to remind us that what we love we worship. What we love, we serve. And it is fascinating to notice the “all” of this command. There is no room for divided affections.
The Psalmist knew this and prayed for a united heart.
Teach me Your way, O Lord; I will walk in Your truth; unite my heart to fear Your name. I will give thanks to You, O Lord my God, with all my heart, and will glorify Your name forever.
He asked the Lord to teach him His ways. He wanted to understand the path that the Lord had for him but also the ways of God, i.e., how God operates. Such knowledge would help him love and follow the Lord fully.