How do I build a recommend system based on user's past purchases?
Content-based filtering is relevant whenever you have features to learn from (features about the products \ user). Sound like this is not your case as you mostly rely on the historical choices \ preferences of your user base. Sounds like a classical use case for Collaborative-Filtering (CF) based approach.
There are many possible CF implementations, most common ones are:
Memory-based: User to User \ Item to Item based similarity
Model-based: Matrix factorization
Of course, there are much more implementation options but these ones could give you a good starting point