Ghost Yarn can be collected from the deep dark Cursed forest. Ghost yarn can be obtained from the POI area Ancient Village. Inside these areas, you also find chests and book cabinets that could contain some loot.
Ghost yarn can also be crafted from regular Yarn, but for that, you need to defeat a world boss. This makes Ghost yarn quite rare and more valued among the players.
Ghost yarn is used in end-gear items, but as crafting it contains killing a world boss, it’s a hard-to-get item as the world boss can be quite beefy. Do keep in mind that if you play on a pvp server with raiding options, you might want to keep this item far from the front door, as raiders will look for it.