In general you cannot transfer media content directly from device to device. It can be recovered into a library on a computer, and from there copied to a new device in the usual way. With an iPod touch you could potentially subscribe to Apple Music which could upload the music on the device to the cloud, from there it could be downloaded to a computer and your iPhone. If you go that route be sure to merge the content of the iPod with the cloud. If you chose replace in error all your content on the device gets lost. Manual recovery using iFunBox and Windows Explorer is an alternative route if you don't want to pay, however temporarily, for Apple Music.
tt2