Trace materials come from a lot of different sources. You'll get some by completing quests or through normal gameplay, while others will require specific activities. Depending on a character's Path, you may need to battle Echo of War bosses, run Calyx stages or enter Simulated Universe mode, so playing these regularly helps stockpile what you need.