Halyards, especially Spinnaker and Genoa halyards, tend to get see sawed across clutches, bridges and the likes and as they age and get salted these became both noise points and also chafe points.
Simply moving the halyard a foot further through the routing will stop the noise but also decrease your chances of a failure due to chafe.
Every so often, remove the shackle from the end of the halyard and move it back a foot or so. Obviously you want to do this only when wear is starting to show and rinsing with hot fresh water no longer works to quieten the lines. I’ve done this once in 18months for instance.