Go right to the adjectives. Look for opposites first. Those are easiest.
David: is he big/small, skinny/fat, tall/short?
Goliath: is he big/small, skinny/fat, tall/short?
If they are opposites, there's your contrast.
Again, look at the adjectives. Look for what's the same.
David: is he muscled/flabby, fast/slow, strong/weak?
Goliath: is he muscled/flabby, fast/slow, strong/weak?
Anything that matches -- or is similar -- boom! That's your comparison.
Last step, you write two sentences (or more): one explains the differences. "David is described as __ and Goliath as __ to show that David is ___ (not likely to win/very likely to win)."
The other explains what's similar: "David is described as ___ and Goliath as ____ to show that they both are ___ (good fighters/heroes/friends/dangerous)."
Hope that helps!