iTunes is an application/program. It uses a library file and media files that are on your computer to keep track of and play your media collection. If you pay for a subscription to Apple Music a copy of your library will also be placed in iCloud where other devices you own can get access to it. If you do not have a subscription but do have music purchased from Apple you can also get iTunes to automatically download media to whatever devices you own, but only purchased music. Since you do not have a subscription you do not get the full library feature. If you buy a new laptop you have to transfer the library and media files yourself.Here are links to 2 documents telling you how to do this:
Back up and restore your iTunes library on your PC https://support.apple.com/HT204318
Move your iTunes library to a new computer - Apple Community user doc by tt2https://discussions.apple.com/docs/DOC-10831
If you have purchased music:
Turn on Automatic Downloads or App Updates - "After you turn on Automatic Downloads, any purchase that you make in the App Store, iTunes Store, or Apple Books on your iPhone, iPad, iPod touch, or computer automatically downloads to all of your other devices. You can also turn on Automatic Updates for apps."
https://support.apple.com/HT202180