Many people confuse analogies, similes, and metaphors. Let me help.
Analogies compare things so that you can see a relationship between them. There are many ways to do it, but the key thing is comparing one thing to another.
Similes do this by saying something is “like” or “as” something else.
Metaphors do this by saying something “is” something else.
So, analogies are comparisons, and metaphors and similes are two ways to make them.