362
Apple has a memory problem and we're all paying for it
(www.macworld.com)
This is a most excellent place for technology news and articles.
The SoC and memory are separate dies with different manufacturing processes. In the case of M2 it was TSMC for the SoC and SK Hynix for the memory.
When it comes time to package them together, the SoC and memory are soldered to a interposer layer. So the only difference is which size memory chips they solder together for the different memory configurations available.