There's a lot to hyphenation rules. There's even more to hyphenation styles, because there's some leeway in the rules but you want to be reasonably consistent in how you handle that lee-way. For this reason, I'm going to just take the case of a coinage for a modifier, as both case-by-case and crack-resistant are examples of that case, and compound nouns, as they're a similar enough case. There are other cases where hyphens are used that I won't tackle.
The main rule, is that you want to make it clear that the modifier is a unit. Imagine someone's eye scans back from "laminates" to see what sort of laminate it is, they'll see "resistant". That means they can pick out the unit "resistant laminates", which is wrong.
It's particularly important in cases where you could mislead. "man-eating tiger" is a tiger that eats people, while "man eating tiger" is a man who is currently eating a tiger.
So you want to make "crack-resistant" a unit, and you use a hyphen for that purpose. It is now a single modifier, essentially an adjective made out of a noun and an adjective.
Likewise, "case-by-case" is essentially an adjective, made out of two nouns (one noun repeated) and a preposition.
Now for the exceptions.
You don't do this if separate adjectives are "piled upon" each other. "A big red ball", or "A big, red ball", but never "A big-red ball". The bigness and the redness are separate, after all.
You don't do this if the two-or-more-word modifier is of the form "[adverb] [adjective]". Here the adverb is modifying the adjective rather than part of it. Again, thinking backwards from the noun can help.
Consider, "amazingly fast car". Thinking backwards we start with "car" which is correct, we are talking about a car. Then we have "fast car" which is still correct, we are talking about a car that is fast. Then we have "amazingly fast car", again correct. While at each point we have added detail, at no point do we have nonsense or something that is incorrect.*
When a noun is used as an adverb (a noun adjunct), then you may or may not hyphenate. E.g. "lightning-fast car" vs "lightning fast car". If the no-hyphen form seems ambiguous to you, then do hyphenate. Note that if you are writing to a style guide, it may have rules on this that you have to follow.
We don't hyphenate proper nouns or proper adjectives. "North American writers" doesn't need to be hyphenated to "North-American writers". While this breaks the working-backwards technique of spotting where hyphens are needed, people do after all read forward, and the capitalisation of proper nouns and adjectives makes them stand out clearly. Also, as a rule we modify proper nouns and adjectives as little as possible (consider that proper nouns include people's names, and that it's polite to call people as they like to be called, so we don't mess with their names).
We may choose simply not to hyphenate some compound adjectives simply because they are very familiar. Hence we might decide to have "high school sports" rather than "high-school sports" because "high school" is a common phrase and the familiarity helps remove ambiguity.
We use an en dash instead of a hyphen if part of the compound is already hyphenated, or has a space. "Turner Prize–winning art", "pro-privatisation–anti-privatisation debate". (In the old days, most people just wrote a hyphen and if what they wrote went to press then a typesetter worried about using an en dash instead of a hyphen, these days we produce our own final results, so it's worth paying attention to these things, though it's small-potatoes compared to the rest of this).
Compound nouns are a lot harder to decide upon. "Egg beater", "egg-beater" and "eggbeater" are all found. In the first, egg is used as a noun-adjunct to tell us what sort of beater the beater is. In the second, a hyphen turns the two nouns into a single unit. In the third they've become a new word. Generally, common pairings start out as one of the first two, and become merged into a new word after heavy usage and familiarity. I recommend hyphenating on first draft, then on second draft seeing if it's common to use it as a single word, use it if it is, remove the hyphen if it's not ambiguous, and leave the hyphen otherwise. In particular, pay attention to whether the hyphen changes the relationship; a terrorist-surveillance operation is an operation that carries out surveillance on terrorists, while a terrorist surveillance operation is a surveillance operation carried out by terrorists.
*Note, "amazingly-fast car" would have been a form used in the 1800s, though obviously not about cars. This is now rare, since the form without a hyphen is unambiguous. Just don't get confused if you see the adverb-adjective compound hyphenated in an older text.