To be more precise, he wrote the music which was used as the theme song for "Cosmos" -- it originally appeared on Vangelis's album "Heaven and Hell", five years before "Cosmos" came out. Apparently it was called Movement 3 from "Symphony to the Powers B", though on my old CD copy of the album it just appears in the middle of the track "Heaven and Hell Part 1". Really powerfully evocative music, takes me right back to being a 10 year old watching "Cosmos".
https://m.youtube.com/watch?v=7FW_wOUUTT8