"The cupcakes from the oven are for my mother."
Translation:Prăjiturile din cuptor sunt pentru mama mea!
First of all, din results from a contraction: de + în -> din. So the two prepositions (din and de la) are derived from în and la, respectively, by adding the preposition de before the initial preposition.
When used to indicate the starting point/ origin of an action or thing, in space or in time (= from) (which is the most common meaning), the difference between din and de la is the same as the difference between în (= in, into) and la (= at, to) (the pairs are correspondent). So when you are not sure whether to use din or de la, you can make up a related sentence where to choose between în and la. If you pick în for your sentence, then you will use din in the original sentence. The same goes for la and de la.
Here are some examples:
Eu merg la şcoală. = I go to school. => Eu vin de la şcoală. = I come back from school.
Eu pun prăjiturile în frigider. = I put the cupcakes in the fridge. => Eu iau prăjiturile din frigider. = I take the cupcakes out of the fridge.
As for choosing between în and la, there are obviously many overlaps in usage with similar prepositions in other languages (especially Romance), but I would say that you ultimately have to learn it by practice in any language you study.