Don’t get me wrong - I’m all in favor of the EU Directive that states that all such devices must have the same charging port from now on. I think that this should have been introduced way earlier.
I also realize that this law doesn’t apply to Apple exclusively, but you don’t find the Lightning port on any other non-Apple devices. If the Lightning port didn’t exist at all, Apple devices probably would have been equipped with USB C ports instead.
But one thing that affects all kind of devices is that they will be outdated at least software-wise mostly deliberately, no matter what charging port they are euqipped with. This even happens with Android-based phones, as there is a wide range of phones that can’t be fixed with alternative software (ie. Graphene, LinageOS and similar).
In my opinon it should be law that manufacturors should allow for end-of-service-devices to be opened up and upgraded with an alternative OS/ software, to extend liftime and to avoid being discarded. This affects mobile phones as well as smart lightbulbs, headphones, or vacuum robots and many more. This indeed has nothing to do with the EU Directive for charging ports, but it could have been another step towards keeping devices longer in the life cycle and thus avoiding landfill.
Too many devices are being bricked by manufacturers deliberatly, and there are barely any ways to repair such devices, because manufacturers do not let it happen.
Try cobalt.tools. It does what you want to do inside a browser tab (although I only used it on desktop so far), but it might work with an IPhone as well. You can convert YouTube links into either mp3, ogg, wave and opus files (with various bitrates), or mp4 or webm video files (with various resulutions). I use it constantly.