I mistakenly restored my iPod to the content of another. I restored it again to the backup of that iPod and now the music library is empty with no playlists, and no songs except those purchased with that account from the iTunes store. I do not see the songs I had purchased by other means, such as Amazon, bandcamp, or directly from the songwriter's website. Even the songs present are listed with a cloud icon and I suppose that they come from the iTunes Store account, not from the iTunes backup.
I confirm that this is the right backup as I can see the apps I had installed and the voice memos I had recorded. But some apps also show a cloud icon.
Furthermore, I was not prompted for the device's password and was asked to choose a new one. I checked that Data Protection is enabled and that 10 failed attempts will erase all data, so I don't understand how I could access the backup without the original passcode.
The iPod Touch is a 6th generation from 2015, had iOS 12.4.8 back some time ago and now has 12.5.1.
Update: From the comments, the songs were missing from the backup, which is only 600 MB and the songs had larger size than that and missing from the computer. The backup has to store somewhere the list of the songs in order to download them again, as one commenter mentioned.
How can I recover the list of songs? Or how can I scan the flash drive of the iPod for files, similar to data recovery programs on a hard drive?