The only way to listen to music in your car for a long time was by buying cassette tapes.
Audio cassettes became popular in the ’60s – they either came with audio preloaded on them, or blank so you could record whatever you wanted. They were added to car radios in the ’70s.
Cassettes started becoming obsolete in the ’90s, when CDs began replacing them.