The Psalmist, likely King David, looks to God's faithfulness in the past to give him courage for the present and assurance of the future.
He has lived many years (v. 9) and seen God's faithfulness since the womb (v.6) and he longs to share his faith with another generation (v. 18).