Both.
I have cards for certain players, teams or inserts that I buy to collect, if I can make money on them great, if not I enjoy having them in my personal collection (PC).
Then there are cards I’ll buy anticipating a rise in value with the intention to sell in 6-12 months or longer. Typically this involves buying rare cards or good players of sports in off seasons when demand dries up, so for example I was buying a lot of big name football cards over the summer when the football news cycle was slow, and recently moved to buying basketball leading into the NBA season.