"Yearning" vs. "nostalgia": a journey through emotions

What is similar?
Both "yearning" and "nostalgia" involve a deep emotional longing and desire. They often relate to feelings about something that is unattainable or has been lost.
What is different?
While "yearning" is a general intense longing for something, "nostalgia" specifically refers to a sentimental longing or wistful affection for the past or a particular period in one's life.
Which one is more common?

Examples of usage
Yearning- She felt a deep yearning for adventure as she looked out at the ocean.
- His heart was filled with a yearning for the peace he once knew.
- There was a palpable yearning in his voice as he spoke of his dreams.
- The old photographs filled her with nostalgia for her childhood.
- Listening to that song gave him a sense of nostalgia for the early 2000s.
- She couldn't help but feel nostalgia as she visited her hometown after many years.