The handover ends Tim Cook’s 15-year run, replacing the operations specialist with the engineer behind Apple’s hardware.