In Psalm 118 we have the thanksgiving of God's elect for God's bountiful goodness and everlasting lovingkindness leading to Christ as the cornerstone for God's building.
Verses 1 through 21 and 27 through 29 are the thanksgiving of God's elect. In verse 1a the psalmist says, "Give thanks to Jehovah, for He is good." This word is repeated in verse 29a. Only God is good, as indicated by the word of the Lord Jesus to the young man in Mark 10, who had addressed Him as "Good Teacher." The Lord Jesus said to him, "Why do you call Me good? No one is good except OneGod" (v. 18). We may think that others are good, but actually besides God no one is good. Because God is good, the psalmist said repeatedly, "His lovingkindness is forever" (118:1b, 2b, 3b, 4b, 29b).
According to verses 22 through 26, thanksgiving of God's elect for God's bountiful goodness and everlasting lovingkindness leads to Christ as the cornerstone for God's building.
In verse 22a the psalmist speaks of "the stone which the builders rejected." Verse 26 indicates that the psalmist was referring not to himself but to someone else. In His interpretation of verses 22 and 23, the Lord Jesus revealed that He was the cornerstone rejected by the Jewish leaders as the builders of God, who, in a sense, were building something for God. Although Christ was the stone given to them by God, they rejected Him to such an extent that they put Him on the cross.