The problem now is that they do everything so, now they have to be best at everything.
If you want to run graphics or ML on the Mac, you have to use Apple hardware and APIS, you cant use nVidia hardware or a lot of industry standard APIs, so apple is at a disadvantage.
If you want to develop on Mac, you have to use Xcode, you cant use any other tools. So Apple is at a disadvantage.
Try connecting a variable refresh rate screen to a mac, or a VR headset, or Thundebolt device, or just a USB device in to one of their mobile devices. Try playing the latest hot AAA game everyone is talking about. Try installing a better voice assistant, store, browser or music player and you will find that Apple has made it hard or impossible.
Everything that Apple itself isn't heavily invested in and market leader at sucks. Apple isn't leveraging the industry to its advantage.
Apple is fine now, because its great at a few things and good enough at the rest of the things it needs to find a large market. How long can a company not fail at one of so many things?