An adjective plus -ㄴ 거 means 'the ___ one', letting you avoid naming the object at all, and 사다 is buying it. Size and price dominate these lines: 큰 거 (a big one) appears three times and 비싼 거 (an expensive one) twice, as in 그냥 비싼 거 살걸 (I should have just bought the expensive one). It is the natural way to shop out loud in Korean when both speakers already know what kind of thing is meant.