Translations
A Song of degrees of David. If it had not been the LORD who was on our side, now may Israel say;
A Song of Ascents. By David.
If YHWH had not been on our side—let Yisra'el now say—
A Song of the Steps. By David.
If Yahweh had not been on our side—let Israel now declare—
A song of ascents. Of David. If the LORD had not been on our side—let Israel now declare—
Footnotes
The superscription shir hama'alot ("song of goings-up") heads fifteen psalms (120–134), almost certainly sung by pilgrims ascending to Jerusalem for the three great festivals. The strong conditional particle lulei opens an unreal past-conditional—a hypothetical of horror held just long enough to make the relief of v.6 visceral.

