What does Psalm 115:1-2 mean?

1 Not unto us, O LORD, not unto us, but unto thy name give glory, for thy mercy, and for thy truth’s sake. 2 Wherefore should the heathen say, Where is now their God? (Psalm 115:1-2 KJV)

Thomas Scott

Verses 1-2: ‘The faithful, oppressed by idolatrous tyrants, desire God to help them.—Because he promised to deliver them, not for their sakes but his own, they ground their prayers upon this promise.’—The verses are evidently a prayer for deliverance, though often quoted as a thanksgiving for benefits received; and they may properly be thus applied. God was entreated to help us people, not because they deserved it, or that they might be honoured, but that his name might be glorified, and the blasphemies of his enemies silenced, by the performance of his faithful and merciful engagements to his worshippers. Ps 74:10-11,21-22; 79:8-13; De 32:26-27; Joe 2:15-17 Perhaps the psalm was written during Sennacherib;s invasion of Judah.