In this sentence, I'm trying to understand the function of 的。 姐姐 给 我 买 的 衬衫. I thought it might indicate possession, but, (in my beginner understanding), that would require 的 to be between 2 nouns. Thanks for considering.
See my answer to this post Why no 的 in this sentence?
的 1.(adjective suffix):
"的" in [姐姐给我买] [的] [衬衫] is an "adjective suffix"
"姐姐给我买的" (the one that my sister bought me) is an adjectival phrase that describes the noun "衬衫"
What shirt? The shirt that my sister bought for me
Using the adjective suffix 的 can turn a very short phrase or a long sentence into an adjectival phrase
失敗 (fail)--> 失敗的人 (failed person/ the person who failed )
沒有工作，整天玩電腦遊戲 (have no job and play computer games all day) --> 沒有工作，整天玩電腦遊戲的人 (the person who has no job and plays computer games all day)