@ashrauth,
usually a stud, when it gets loose, does not destroy the thread in which it's located at.
The mufflers movement does.
However there is a reason why it got lost.
Mostly by overtightening. Then there might be some gunk or even a part of your old stud in there.
So, pry carefully with a small pointed tool to terminate how deep the thread really is. Compare depht with new stud. The shorter end goes into your cylinderhead.
Try now with a normal (softmetal) 8 mm bolt tenderly to log out what's going on there.
Keep in mind, a cylinder head is expensive.
Once you are sure the bore is deep enough to house your new stud, use your tap and tie set to
re-cut your thread.
Your thread cutter will be pointed, so it will NOT cut your new thread until the end.
You have to be very careful not to shear out your newly cutted thread.