I have found that music (and sound in general) can be a very powerful tool to help focus. But it goes both ways. Listening to the right, repetitive song or noises can help me achieve my focused "flow state" much faster. Conversely, listening to new music, music with lyrics, or any irregular noises will destroy my concentration pretty fast.
For me, I think it comes down to isolating myself from unexpected stimuli while trying to focus. Listening to a video game song on loop, relatively loudly to block out external noise, is something that has worked well for me.
However, everybody is different. Do you listen to music / white noise / etc while working? If so, what's your go-to?