There are two assumption's that the title of this thread makes.
First that one is familiar with a wide variety of music.Which is usually not the case.Most people listen to only a particular kind of music and have little interest or knowledge of other kind's of music.Before making generalisation's one would probably need to spend year's,decade's,multiple lives

before possibly being in a position to venture any opinion on multiple "genre's".I dislike using or hearing the "g" word because it is used too casually or thoughtlessly by most people.
The OP 'knows that rock sounds great on vinyl'.Which rock?The easy listening soporofic rock of Eagles,Dire Straits and Pink Floyd?The screaming,wailing rock of Led Zeppelin,Deep Purple,King Crimson and Black Sabbath?The Rock'n'Rolling sounds of The Beatles,Rolling Stones and The Who?The live rock of Cream and Grateful Dead?The blues inspired rock of Hendrix,Clapton,Stevie Ray and Mayall?The protest rock of Woody Guthrie,Phil Ochs,Bob Dylan and Joan Baez?British Rock?American Rock?Rock from the 60s,70s,80s,90s?Male rockers or women rockers?
Second that listening to a particular genre on Vinyl can be better than listening to the same stuff from a CD or a Flac/Dac,Mac/Dac.One would not only need to listen to all the "genre's",but listen to them on Vinyl,on cd,on a hard disk,on a cassette.....before being able to draw any conclusion.
Whether one prefers cd or vinyl is a matter of preference based on which format one has invested time and money in over the years.Good sound,from vinyl or cd,irrespective of the music being played,would depend on the entire chain of clean power,quality of recording,source,amp,ics,speaker cables,speakers,room acoustic's,placement,listening position,lack of ambient noise.