The most accurate descriptions of the relationship between analogies and metaphors would be that "metaphors can be parts of analogies."
To clarify:
-
Metaphors are direct comparisons between two unlike things, suggesting that one thing is another to highlight similarities (e.g., "Time is a thief").
-
Analogies explain how two things are similar in multiple ways, often used to clarify or illustrate a concept (e.g., "Life is like a journey; both have ups and downs, and require planning to navigate").
In this sense, metaphors can be used within analogies, but they are not interchangeable, and analogies tend to be more complex as they often involve multiple points of comparison.