iPhone is successful because Apple is a services company. We all like to think of Apple as a software/hardware company but the real invisible force that keeps the company going are services.
If that is true they are failing at being a services company. iCloud is inconsistent and it's pricing is not justifiable. I can't think of a single area where Apple delivers a great services product. Siri is also half-ass.
Apple makes money from its hardware and its software is a compelling hook. macOS/iOS is a driving force in keeping me an Apple customer. It just works and it's easy to navigate. It is really the most seamless ecosystem IMO and that appeals to me. Everyone can make nice hardware. If spend enough you can have a quality build, in a nice form factor from Windows based hardware.
I wish Apple would up it's services game but I think they are distracted by too many different things. The fragmentation and lack of focus is something that I think Jobs would have frowned upon. He was quoted as something like "it's important to be able to say no. There are lots of things you could do but should not do." (gross paraphrasing)