Passage
God--who is giving vengeance to me, And He subdueth peoples under me,
God--who is giving vengeance to me, And He subdueth peoples under me,
Psalms 18:45 Sons of a stranger fade away, And are slain out of their close places.
Psalms 18:46 Jehovah liveth--and blessed <FI>is<Fi> my rock, And exalted is the God of my salvation.
Psalms 18:47 God--who is giving vengeance to me, And He subdueth peoples under me,
Psalms 18:48 My deliverer from mine enemies, Above my withstanders Thou raisest me, From a man of violence dost deliver me.
Psalms 18:49 Therefore I confess Thee among nations, O Jehovah, And to Thy name I sing praise,
The verse centers on "god--who", "giving", "vengeance", "subdueth", "peoples", and "under". It is saying that the verse draws attention to "god--who" and "giving", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 46's "Jehovah liveth--and blessed FI is Fi my..." into verse 48's "My deliverer from mine enemies Above my...", so "god--who" and "giving" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "god--who" and "giving" with trust shaped by these words, not by a vague optimism outside the passage.