Apple isn’t soldering ram. Thats what they did with intel Macs. Apple Silicon has the CPU, GPU and Unified Memory all on the same chip. They are all apple designed. It might very well cost them a negligible difference to make a unit with 16Gb vs 64Gb. But they still have to recoup their R&D cost. Plus make a profit. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.