If I want/need to listen to something from [major record labels] I use one of the free streaming services
Free streaming services behave more like noninteractive radio than like an interactive jukebox. All playlists are shuffled. This is because copyright law in my country (USA) provides for a cheaper performance royalty for qualifying noninteractive services.
the thing is to get software which exports a list of the songs and playlists you have and then get copies from wherever available on the internet
Say I've extracted her playlist as a list of artists and titles. Right now, Amazon appears to have a monopoly on selling lawful DRM-free downloads of major-label music over the web. Google closed its store years ago when rebranding its rental service as "YouTube Music", and Apple's store has always run in a proprietary native application, not the web. So it's either enrich Jeff Bezos or "No, I'm not buying two thousand dollars of used CDs just to be able to use that Linux thing you keep talking about."
Gradually move away from an iPhone to a device you actually own.
Which device might that be that operates on the major cellular networks in the USA? I've read takes that one doesn't meaningfully own an Android-powered phone in the same sense that one doesn't meaningfully own an iPhone. In the interest of reliability, Google has been locking down Android tighter and tighter over the years since Android 10 changed W^X behavior so as to break (for example) Termux.