YouTube is lateral, but it was an acquisition. Minor business, but being a DNS registrar is down the stack. So it seems that Google did go down mostly.
I would say Apple went "up" in at least one phenomenal way. They started out with computers, and then 20 years later their big success was iPod + iTunes. iTunes is probably 2 levels up the stack, being mostly a media business, not really software even.
Apple also wrote a lot of apps like Keynote, and acquired apps like Logic, etc.
The Apple ][ was an appliance, the Mac even more so. That was happening during an era where a lot of computers still shipped in kits.
The iPod was a better UX on top of existing mp3 players Asians OEM were making (5 buttons and a tiny liquid crystal screen).
The iTunes store was Jobs spending an afternoon downloading music on the internet and figuring out he was saving less than minimum wage doing so.
They basically went from subcontractors for Dell and the like, to almost completely replacing Dell and the line by moving up in the chain until Dell had very little value left to add.
https://en.wikipedia.org/wiki/Pixar_Image_Computer
And then they wanted to sell software:
https://en.wikipedia.org/wiki/Pixar_RenderMan
And then they ended up making movies! This is described in Ed Catmull's book and I think there's a documentary on Netflix too.
---
I also think it's interesting that George Lucas started out as a special effects guy and then he made Star Wars. So the effects really do help the storytelling.
They started with the OS, branched to languages, added Office (against much better competitors), started to control the browser and then antitrust happened.