Although the math demonstrates that there are uncountable permutations of notes, rhythms and harmonies…
Empirically a musician knows that pretty much any “normal” melody has been pretty much done before. Maybe not in total (let’s say 16 bars), but in chunks, ie motifs.
In western popular music there are 12 chromatic notes, but usually we only use the 7 diatonic ones, and of those the 1, 3 & 5 tones are the most important. We start with a home harmony, modulate in standard ways, and have a cadence leading back to home. Almost all songs are in 3/4 or 4/4 or 6/8 meter. (You could say that 2/2 and 12/8 are really the same as 4/4 and 6/8)
If you follow “the rules” in the paragraph above, you’ll find yourself in a multitude of songwriters that have been churning out tunes since the time of Bach. For every composer we know of from any era, there are a thousand that were prolific and since forgotten, and a million that tried and were never successful. Throw all those tunes into the mix!
Yes, it’s hard to come up something that is truly original.