RAM eats battery. Apple has made a strategic decision to pretend RAM doesn't exist, ship underpowered hardware, then brag about the battery life.
This is also the reason RAM is not listed on iPhone specs.
If I remember correctly the iPhone Pro 12 Max has twice as much RAM as the other 12 models and it's nowhere in the marketing materials. This is not accidental, it's a fundamental part of Apple's strategy.
EDIT: The max has 6GB and the rest of the line has 4GB. That is not twice as much. I did not remember correctly.