It’s a pain having to attach one piece to another! (6)
I believe the answer is:
stitch
'it's a pain' is the definition.
(pain in the body)
I don't understand how the rest of the clue works.
Can you help me to learn more?
(Other definitions for stitch that I've seen before include "Loop of thread" , "Surgical suture" , "''A . . . . . . in time saves nine'' (6)" , "One's in time to save eight others" , "herringbone?" .)