Make sure you have some decent headphones/speakers before you start, which will allow you to pick up the subtleties in what’s playing. Then get a streaming service with high quality. RateYourMusic is pretty good for organizing best albums of each year or decade, by genre as well. It might not have what was popular from a historical perspective but is probably a good start. I check out different genres and then read about them on Wikipedia, which has a ton of information about every genre and chronology of music.