I just saw something about this. The reason Apple hasn't been impacted is because their sales have been dropping for the past few years on iPhones and other devices. That trend hasn't changed during the pandemic. While many of the other players predicted drops during the pandemic, and initially it did, that demand dramatically increased, especially in the desktop market (AMD, Nvidia, etc). It is hard to fault companies from predicting the massive increase in a market that has been decreasing for decades(?) now. There is limited capacity at TSMC and Samsung. They leave buffer, but that was quickly consumed because almost everyone needed more capacity. It takes potentially years to increase capacity (build a new fab, etc), they have no room to allow any companies to adjust their capacity reservations.
So at the end of the day, it isn't that Apple was necessarily better...their demand just didn't change and continued the downward trend in certain product areas, giving them breathing room.
It does look like apple's unit sales (of phones at least which are the lion's share of product) have been declining (conveniently they stopped reporting unit sales long ago) but I don't think that really applies here. Apple's share of the total semiconductor market is far from dominant.
What's really interesting is how well they couple demand to shipment. One is that they appear to have low levels of unsold inventory, both on the incoming (BOM) side and output (unsold manufactured output, such as phones), reflecting some incredible discipline. They also manage to insure themselves against supply shock (because such a tight tolerance for over purchase and overproduction makes your supply chain more brittle) by making big moves in their supply chain like financing their suppliers, doing manufacturing R&D on their suppliers' technology and then supplying that tech to the suppliers, taking big positions in commodity markets (e.g. famously in DRAM a few years ago) and other such things you can do when you have so much cash on the balance sheet.
Better use of capital and better supplier flexibility (why consume your suppliers’ capacity on stuff you don’t need when you could switch them to the next gen thing you need?).
You could think of it as avoiding bufferbloat in the physical domain.
Also refreshes are real annoying/unprofitable when you have millions of old tech sitting in warehouses. Apple has pretty good science on the sneak peak / release / fulfill of new tech. You can basically get day1 or at least week1 release of any new product.
So at the end of the day, it isn't that Apple was necessarily better...their demand just didn't change and continued the downward trend in certain product areas, giving them breathing room.