Will you please give some biblical illustrations of a metaphor or an analogy?
The Mirriam-Webster Dictionary defines metaphor as "a figure of speech in which a word or phrase literally denoting one kind of object or idea is used in place of another to suggest a likeness or analogy between them (as in drowning in money)."
An analogy is "a comparison of two otherwise unlike things based on the resemblance of a particular aspect" (Merriam-Webster).
A simile is "a figure of speech comparing two unlike things that is often introduced by like or as (as in cheeks like roses)" (Merriam-Webster).
Mirriam-Webster adds: Many people have trouble distinguishing between simile and metaphor. A glance at their Latin and Greek roots offers a simple way of telling these two closely-related figures of speech apart. Simile comes from the Latin word similis (meaning "similar, like"), which seems fitting since the comparison indicated by a simile will typically contain the words as or like. Metaphor, on the other hand, comes from the Greek word metapherein ("to transfer"), which is also fitting since a metaphor is used in place of something. 'My love is like a red, red rose' is a simile, and "love is a rose" is a metaphor."
An analogy, says Brian Clark (copyblogger.com), "is comparable to metaphor and simile in that it shows how two different things are similar, but it's a bit more complex." He explains, "Rather than a figure of speech, an analogy is more of a logical argument. The presenter of an analogy will often demonstrate how two things are alike by pointing out shared characteristics, with the goal of showing that if two things are similar in some ways, they are similar in other ways as well."
We find many metaphors and similes (among other literary devices) in Scripture. Here are a few examples of metaphors:
Christ is the "bread of life" (John 6:35), "lamb of God" (1:29), "light of the world" (18:12), "door of the sheep" (10:7), and "good shepherd" (10:11). Of course, Christ is not literally bread, a lamb, light, a door, or a shepherd, and His disciples are not literally sheep. These are all metaphors.
Similarly, God is not literally a "rock," "fortress," or "shield" (Psalm 18:2). The Psalmist knows God is his protector, so he describes Him, metaphorically, as things that provide protection from harm.
These are just a few examples of biblical metaphors. We could multiply this number many times over, but these examples should give you a good starting point for recognizing metaphors when you come across them in Scripture.
Here are a few examples of similes in Scripture:
"The kingdom of heaven is like a treasure hidden in the field…a merchant seeking beautiful pearls…a dragnet that was cast into the sea and gathered some of every kind" (Matt. 13:44, 45, 47). All the "kingdom of heaven is like" statements are examples of similes. The scribes and Pharisees say Jesus "are like whitewashed tombs" (23:27). "Every teacher of the law who has become a disciple of the kingdom of heaven is like the owner of a house" (13:52).
Do you see how a simile differs from a metaphor? Jesus says, "I am the bread of life." That's a metaphor. If He had said, "I am like bread," that would have been a simile.