Technically? Not really, because music isn’t just a melody. It often involves beats, harmonies, countermelodies, or even included sound effects. When you consider the possible combination of notes and rhythms in each layer, not to mention the different instruments you could use, it is very hard to run out of music.
But this doesn’t mean that musicians can’t run out of unique sounding music. In theory, a musician has an infinite amount of combinations they can use to make a song. However, only a certain amount of these combinations sound pleasing to the ear. For example, a song will almost always start and end in either the tonic or dominant key, because it sounds best to the ear.
Musicians might also use very specific musical methods to convey a mood or message, like using leading tones or chromatic notes for tension. Pop artists in particular end up making music that sounds very similar to other radio songs (some of you might know that most pop radio aired songs can be played with the four chords Am, F, C, G).
Musicians may also unintentionally replicate the melodies/beat of other songs, because they are subconsciously thinking about other music. Yes, it’s true that few songs by different artists are exactly the same. And no, a musician can’t technically run out of music. But if you listen to enough songs you’ll find that a few of them sound suspiciously similar.
However, he can run out of unique ideas. A musician, over time, will tend to use certain themes, riffs, or ideas more often instead of creating new ones. It’s because these make their signature sound, and as time goes by, a person tends to have this perception that they’ve seen more of the world than most of the people younger than them, and not all new things are easy to understand, and some new things are just not to your taste. Because of these limits, creativity may not be as robust as it was before.
This is why listening to new music, no matter how crappy it may be to him, is very important, because that’s where the new ideas are.