Everyone will differ to a great degree on this; there's a couple of posts above where players or table runner mention they find music distracting or just don't like it at all.
Other alternatives I've heard of: some will lean less on "music," and more mood soundtracks, things like soundscapes or various sound effects to reproduce the environment the party happens to be navigating through.
If I use music, I try to tie it as close as possible to the themes of the campaign if possible e.g. for classic fantasy, I use sound tracks from older video games or particular television series as a general base, then build off of that. Examples include BG 3, EQ, FFXI, FFIV, The Witcher 2 & 3, Child of Light, Dragon Age, etc.
Critically, I try to avoid games or tv shows that are recognizable by the table.
I segue way from that into battle music, typically from like sources when combat starts.
I also include a couple offbeat tracks for particular npc's the party have met. So for example, occasionally neo-folk groups like Danheim will pop up, because they're emblematic of the half-orc bard that's currently adventuring with the party.
There's also a song that functions as the anthem of the city they're based in. They recognize it when it plays now.