The traditional rules of grammar are:
A relative clause beginning with "that" is restrictive. The clause is used to mark which option is meant. It is not marked by commas.
A relative clause beginning with "which" is nonrestrictive. The clause only adds extra information. It is marked by commas.
I own two phones. One phone is old and the other is new. I found the phone that I bought yesterday under my desk.
Here, "that I bought yesterday" shows which of the two phones I mean: I found the new phone, not the old phone. The relative clause restricts the phone we are talking about from a set of many phones.
I read War and Peace, which is a great book, when I was 20 years old.
Here, we don't need to explain which War and Peace we mean; there is only one. The clause gives more information about War and Peace. It does not help identify a particular one from a set.
In your first case, there is only one bag, and you are describing it:
I found the bag, which you bought yesterday, on the desk.
In your second case, there may be more than one bag, and you're clarifying which one:
I found the bag that you bought yesterday [rather than the one you bought last week] on the desk.
(Also note that your use of find is not natural. I changed it to past-tense found.)
Note that many native English speakers are not strict in their use of that and which, especially in everyday speech. Generally, you will be easily understood, even when using the wrong one. Many speakers will commonly use "that" for both restrictive and nonrestrictive clauses.