I’m assuming the string is a mesh. It would be easier if it was a curve. With that said you can use a curve and a curve modifer. To make it easier I would separate the part that going to loop from the straight part. Otherwise you can at the part that is to coil around to a vertex group and use that group with the curve modifier.