I think Apple is doing fine and is reasonably well positioned. The pre-Cook years basically established the skeleton of the company and Cook has fleshed it out with flesh and muscle. Now the company is far more of a Goliath with vast resources to help it weather strategic pivots, in addition to a loyal and trusting customer base.
Looking ahead to the next decade or so I believe what we're likely on course for is some sort of AI OS. AI will be able to vibe-code apps for you and you'll be able to manage and dispatch individual agents to do tasks. There will be a messy transitionary period that lasts a while from today's software.
Apple has a trusting customer base, they have tremendous hardware prowess, they have cross-platform cloud services, and they have design sense to figure out how to establish these new models. I think if a new form of computing emerges Apple basically gets a free first swing at it, in terms of consumer trust. We've seen that with their VR headset, that while a dud was given far more interest and attention than Facebook's and Microsoft's offerings.
I do think they show signs of vulnerability as well, even if I think they're less than their strengths. Apple's famously design focused culture seems to be cracking a bit and giving way to more Microsoft / Google style PM-led culture. That can be OK, but I think PM led cultures are sometimes almost too strategic for their own good, like someone you can tell is a salesmen not a friend, and that can result in gradual brand erosion.
A simple example of this happening is Apple's website. Like Microsoft the tabs at the top of their website now reflect the company's internal organization, not what makes the most sense to the user. In the Jobs era they insisted that there would be no separate "store" tab, a redundancy because the whole website was a store, but I suspect that changed because the "Store" division within Apple wants that extra prominence.
If Apple isn't careful with enough missteps they may dilute their brand and Google / Microsoft may seem just as appealing for early adopters of emerging AI OSs.