Despite half my fics being named for songs, I don't always listen to them while writing (I get distracted). They can definitely inspire the mood for a scene, but that's a thing that mostly happens before I note down an idea and hours/days/weeks later put it in a fic.