Big manufacturers also order their DRAM in advance with contractually negotiated pricing. They're not paying these spot market prices for every computer they ship.
~~~~~helps that Apple's SoC has the RAM on the main die itself. They're probably immune from these price hikes, but a lot of the PC/Windows vendors would, which would only make Apple's position even stronger~~~~
If Apple is insulated it is likely because Apple signs big contracts for large supply and manufacturers would prefer to be insulated from short-term demand shocks and have some reliability that their fabs can keep running and producing profitable chips.
And in this article you can see a photo of the memory chips attached outside of the Apple component https://www.gizmochina.com/2020/11/19/apple-mac-mini-teardow...