Below is a slightly different interpretation as to what is currently possible with Apple, and some options:
In February, 2025 Apple started allowing purchases to be migrated to a different account. This is not available in all countries. If you do wish to migrate purchases, Apple has several lengthy and detailed articles about doing this, including limitations:
- Purchases can be migrated from a secondary to a primary Apple Account to consolidate them. (This feature isn’t available to users in India.) —> Migrate purchases from one Apple Account to another Apple Account - Apple Support
- Learn about what purchases and associated content can be migrated between two accounts. —> About migrating Apple Account purchases between accounts - Apple Support
I do not agree with what was said in another post about not migrating music. What Apple says in the first article above is: "You can migrate apps, music, and other content you’ve purchased from Apple on a secondary Apple Account to a primary Apple Account."
If you cannot migrate your purchases or you wish to keep the old account, look into using Family Sharing to continue to be able to use items purchased with one Apple account with other Apple accounts, and for some data sharing features.
- Family Sharing - How Family Sharing works - Apple Support
- Set up Family Sharing - How to set up Family Sharing on your iPhone, iPad, or Mac - Apple Support
If you still have access to the old account, update the email address to one that is currently working. It can't be one used with Apple before or currently. The support article Change your Apple Account primary email address - Apple Support outlines various methods for changing the email address (Apple ID) you use for your Apple Account while retaining everything in your account.
Apple has never supported transferring media from a mobile device to a computer or another device. You are supposed to retain a master copy from its original resource, either an online store or a copy on a computer. If you music is from a CD and you don't have a copy on your computer then you will need to re-rip the CDs.