The “decline” of vinyl is really just due to Moore’s Law. Cassette tapes, then CDs, now streaming and serving. These other media types are easier to mass produce, and at likely less cost.
Meanwhile, as radio took off even more in the 70s-90s, more and more albums were produced with more compression and less dynamic range to be able to sound their best in cars. Many modern CDs carry this mastering over, and creating a proper vinyl master with improved dynamic range required an entirely separate effort. As such, in combination with Moore’s Law above, supply and demand dwindled (less pressing plants over time, less people buying records) and many albums started not coming out on vinyl.
Then to add to that, your point. I don’t think rock died so to say, but many artists started writing music given the high compression and reduced dynamics in styles that suited the radio. And this shapes most of the popular music that exists today.
Those that love vinyl today are looking for masters and pressings that have low compression and high dynamic range, but sadly 50% of the vinyl out there just use the same masterings that are put on CD and for the radio.