Unless you have Apple Music etc. then all that signing into your iTunes account does is to make available music that you've purchased from the iTunes Store. So if you mean that music you've copied into your iTunes Library from CD (or other non-Apple sources) is missing, then you will need to copy it from the old machine onto your new one.
In an ideal world, you would copy the full MUSIC folder from your old computer into the Music folder on the new one. As well as containing all your CD copied music, any music purchased from other sources (such as Amazon) would be in there as well, along with control files used by iTunes (such as Playlists and Play Counts etc.).