Psalm 22:23-24, ‘…stand in awe of Him…FOR He has not despised or abhorred the affliction of the afflicted, and He has not hidden His face from him, but has heard when he cried to Him.’
Verse 24 (starting with “For He…”) gives the reason that YHWH is to be praised, glorified, and stood in awe of (v.23), namely that He has not ignored the afflicted, but has rescued them. There are many directions we could take this, but here I just want to point out that YHWH’s refusal to hide his face from the affliction of His people is the ground for why He is to be praised—or, said another way—is the revelation of His praise-worthy character.
Of course, the supreme instance of the Lord’s salvific presence with the afflicted (and therefore the supreme revelation of His character and supreme impetus for our worship of Him) comes when He—in Christ—enters into the affliction of His afflicted ones, when He gives His face to be marred under their plight (Isaiah 50:6, 52:14), and when He—having entered and endured the totality of His people’s affliction—is then raised up, carrying affliction-overcome in His own flesh and so transfiguring suffering into glory, sorrow into joy, affliction into praise.
This—the crucifixion and resurrection of Jesus–IS the salvific work ultimately alluded to in v.24 and so IS the ultimate ground for the worship called for in v.23.