It's best to do both in some cases, both buy things you need and collect any crafting materials you find, to avoid running out when you really need them. Just my experience, though.
The only things you may have difficulty buying are higher grade materials, but that seems to be less of an issue as you level up (in my experience). The hardest to purchase material that I was looking for was Ebony, but there are two mines that are loaded with ore.