Peter quotes here from Psalm 55:22. In that psalm, David had lamented the betrayal he experienced on the part of his (former) close friends. In the face of that heart-piercing loss, David laid his troubles repeatedly before the Lord (Psalm 55:16–17) and so instructed others also to “cast your burdens on the Lord” with the assurance that “he will sustain you” (Psalm 55:22). Jesus had given similar instruction (Matthew 6:25–26).
7 casting all your anxieties on him, because he cares for you.