Your Apple Music subscription is tied to your Apple ID, which means that it will automatically carry over to a new device. You can simply sign in with your Apple ID on the new device to access your subscription and library.