In simple words: Bag of Words counts terms; TF-IDF highlights relatively distinctive terms.
Count words
Bag of Words represents a document using word counts. It is easy to build but usually ignores word order. “Dog bites man” and “Man bites dog” have the same counts.
Weigh informative words
Term Frequency–Inverse Document Frequency (TF-IDF) gives more weight to a word that matters in one document but is uncommon across many documents. Very common words tend to receive less weight. TF-IDF still does not truly understand meaning or context.
See the flow
In support tickets, “refund” may help identify billing problems more than a common word like “the”.
Remember: Bag of Words counts terms; TF-IDF highlights relatively distinctive terms.