Psalm 25 does not look much like a Messianic psalm. Yet there is no reason to exclude our Lord Jesus Christ from it, and there are good reasons why we should think of it too as His song.
The Psalm has a rough chiastic structure (see this article: https://expoundtheword.com/chiasm-psalm-25) and three kinds of material. At the beginning (v. 2-3) and end (v. 19-21) David prays for deliverance from shame caused by enemies. In verses 4-5, 8-10, and 12-15 he prays about the Lord leading him in and teaching him His way. And in verses 6-7, 11, and 16-18 he prays for pardon of sin.
The prayers for deliverance from shame are as applicable to our Lord as they are to us. His enemies hounded him constantly throughout His earthly ministry to destroy His reputation and finally to subject Him to a humiliating death. He must often have prayed to His Father: “Let me not be ashamed. Let not my enemies exult over me.”
It may seem at first to be less likely that Jesus would pray, “Cause me to know Your ways, O Yahweh.” But Hebrews 5:8 teaches us that “He learned obedience by the things which He suffered.” He was meek (v. 9) and lowly of heart. To Him too, therefore, the paths of the Lord were lovingkindness and truth (v. 10). The secret of the Lord was with Him, and He knew the Lord’s covenant. He was, above all others, the one who feared the LORD (v. 12) because He had received instruction in His way.
The confessions of sin are not directly applicable to our Lord. Yet, even here we must remember that God “made Him to be sin for us.” He was condemned as a sinner and the anger of God was on Him for sin. His experience was, therefore, the experience of the judgment that is due sinners, so that at least parts of the prayers must have found a place in His communion with His Father. “Remember Your mercies, O Yahweh, and Your lovingkindnesses.” “Turn to me, and be gracious to me, for desolate and afflicted am I. The troubles of my heart have enlarged. From ym distresses bring me!” (v. 16-17).
It is precisely because this was the prayer of our Savior, that it can also be ours, and we can be confident that the Lord will hear us when we lift up our souls to Him.