A Psalm by the sons of Korah; a Song.
1His foundation is in the holy mountains.
2Yahweh loves the gates of Zion more than all the dwellings of Jacob.
3Glorious things are spoken about you, city of God. Selah.
4I will record Rahab and Babylon among those who acknowledge me.
Behold, Philistia, Tyre, and also Ethiopia:
“This one was born there.”
5Yes, of Zion it will be said, “This one and that one was born in her;”
the Most High himself will establish her.
6Yahweh will count, when he writes up the peoples,
“This one was born there.” Selah.
7Those who sing as well as those who dance say,
“All my springs are in you.”
Jacob was the son of Isaac and Rebekah, born immediately after Esau, and Abraham was his grandfather. He achieved the right of the firstborn by trickery, in offering his older brother, Esau, food in exchange for the birthright, who cared little for this position. He also received the blessing of firstborn from his father Jacob before his death by cunning, and with the assistance of his mother Rebekah.
After his deception of Esau, receiving the blessing from his father, Jacob escaped to his uncle Laban, who in turn deceived Jacob into working for fourteen years for the marriage of Jacob to Leah, and then his beloved Rachel. Laban also sought to deceive Jacob of wages, but God intervened to ensure he would prosper. In a time of trial, when he feared the wrath of Esau, upon returning to the land of Canaan, Jacob had an encounter with God, and his name was changed to Israel, the one who wrestles with God. Even though his early life was characterized by deception, God worked through the situation to ensure that Jacob would be the one in the line of the patriarchs, to create a great nation and ultimately fulfill His purposes in the earth, especially through the future Messiah. The Messiah would guarantee the promise of the land to Abram and a person who would rule over Abraham's descendants, but also He would bring blessings to all the people of the earth (Gen 12:1-3).
In spite of Jacob's early failure by deception, God worked through him, and finally, Jacob became a different type of man after his struggle with God. As one has said,
"Despite Jacob’s faults, God chose him to be the leader of a great nation that still bears his name today. But for this, it is unlikely that we would know much about Jacob, who appears to be in the middle of events while the key players are those around him. There is no great wisdom or bravery in Jacob to speak of, and we are tempted to see him as little more than God’s passive instrument. If we are tempted to think that, because we aren’t in the spotlight performing great acts for God, we are unimportant to Him, then we should consider the life of Jacob and know that, in spite of our failings, God can and will still use us in His plan."
For more on Jacob, see "Who was Jacob in the Bible?", https://www.gotquestions.org/life-Jacob.html