The Egyptians were using tools to twist fibers into rope 5,000 to 6,000 years ago. I cannot imagine that twisting fibers into yarn for clothing came long after that. The technology may have been slow, but the basic idea must be extremely old, and it should have spread quickly with trade.
It’s also possible for 2 people in 2 places to have the same idea.