A couple of years ago, the New York Times ran an interesting piece by an economist who used data from Spotify to work out at what age we form our closest attachment to popular music. By comparing the year of release for the songs to the age of the user, he determined that men most frequently play songs that were released when they were 13-16 years old. For women, it was 11-14.
The author concluded that we form our deepest and longest-lasting attachments to music when we are in our early teens, which is to say the age when most people go through puberty. Makes sense to me.

However, I don't stream songs, I listen to records. And I think about my favorite music in terms of albums and groups rather than individual songs. So it might be more instructive to look at my LP collection and see what it says about my favorite years for music.

1977 - 260
1973 - 251
1971 - 247
1972 - 245
1970 - 230
1976 - 223
1967 - 209
1969 - 209
1978 - 209
1966 - 204
1974 - 191
1975 - 190
As it turns out, my guess of 1965-1975 was pretty close, even though my collection seems to skew a little more toward 1966-1976 or 1967-1977. In any case, 1970-1973, which the Times article suggested would be my favorite years, are four of the top five years in my collection. As they used to say on the TV show Mythbusters, the Times's theory is "confirmed."
While I was reading about how and when we form attachments to music, I came across some other studies that say that even though the early teen years are most crucial in forming our musical preferences, people generally continue following and discovering new music until their early 30s. After that, most people pretty much just listen to whatever they liked before then for the rest of their lives. If that is accurate, it would suggest that for me, I wouldn't be very interested in music released after about 1990, when I turned 33. As it happens, that's just when the LP essentially disappeared from the market, replaced by cassettes and CDs. So it's hard to draw any real conclusions by counting albums in my collection from those years. However, a bunch of music from the 90s and later has now been reissued on vinyl, and it's telling that out of the 6,000 plus albums I own, only about 200 are albums of new music released after 1990. And most of those are albums by artists I have been following since the 70s, such as Tom Waits' Mule Variations from 1999, Joni Mitchell's Shine from 2007, or Bruce Springsteen's Western Stars, released in 2019. Which is to say that I'm not discovering many new artists, just enjoying new music by the same artists that I have followed for decades. I believe that the theory about when we stop discovering new music is also "confirmed," at least for me.

In fact, I can count on one hand the pop artists who debuted after 1990 that I listen to with any regularity. Without looking, I can think of Diana Krall, Hiss Golden Messenger, The Explorers Club, Madeleine Peyreux, and um, let's see here, there must be another one. Um, nope.
At the same time, my appreciation for music of the 50s and 60s -- all kinds of jazz and singers like Johnny Hartman, Sarah Vaughn, Sammy Davis Jr., and Anita O'Day -- has grown exponentially over the past 20 years, well past the age when I should be discovering and enjoying "new" music. Maybe it's like when younger people today say that they love the Stones or the Dead; there is some kind of a loophole for developing an attachment to music that was created before our early teens. Discuss.
At any rate, the various articles I found online have answered a lot of questions for me. I think it's true that most of us form our closest emotional bonds with music during our early teen years. Beyond that, we have about a 15 year window when our brains are still receptive to new music. After that, I would say it's still possible to develop an appreciation for new music, but perhaps not the kind of emotional attachment that we have for the music of our youth. Which explains why nearly everyone believes that "music was so much better when I was a kid." Turns out it's true.
Enjoy the music!