Our DD did this aroudn that age, also only when nursing, but she was yanking out hair to the point of having bald patches.
Our ped called it "self-stimulating, self-soothing" behavior, though we couldn't see how yanking her hair out could be very soothing. Doc said she'd stop at some point by herself.
We tried various ways to distract her from pulling: I'd hold her hand, but she'd yank it away and go for her hair; I'd tempt her with a little toy to feel, a hairy one...that gave her a chuckle but didn't do much to stop the behavior; I'd try to get her to hold a stuffed animal or other toy while nursing. At some point the attention of our trying to distract her only made it worse I think.
We finally ended up having the hair place cut all her hair off very short, except for a bit of a tail, so she had some token long hair. It was an improvement as the bald patches under her longish hair only made her look like a cancer patient. Our little girl with a crew cut!
It was difficult, but really she was kind of cute that way too, not that I'd recommend the look...
I hope yours grows out of that faster than ours did.

Our ped called it "self-stimulating, self-soothing" behavior, though we couldn't see how yanking her hair out could be very soothing. Doc said she'd stop at some point by herself.
We tried various ways to distract her from pulling: I'd hold her hand, but she'd yank it away and go for her hair; I'd tempt her with a little toy to feel, a hairy one...that gave her a chuckle but didn't do much to stop the behavior; I'd try to get her to hold a stuffed animal or other toy while nursing. At some point the attention of our trying to distract her only made it worse I think.
We finally ended up having the hair place cut all her hair off very short, except for a bit of a tail, so she had some token long hair. It was an improvement as the bald patches under her longish hair only made her look like a cancer patient. Our little girl with a crew cut!

I hope yours grows out of that faster than ours did.