A metaphor is a direct comparison between two unlike things without using "like" or "as", implying that one is the other to create a vivid image or deeper meaning.
In Tintern Abbey, Wordsworth refers to nature as:
“The anchor of my purest thoughts, the nurse, the guide…”
Here, Nature is not like an anchor, nurse, or guide — it is those things metaphorically. He assigns these roles to nature to highlight its stabilizing, nurturing, and instructive influence on his life.