The same thing happened to me. Even though the physical memory of my laptop is 32 GB. Then I changed the settings on the SNAP Configuration Optimiser as shown in the picture.
Then in the SNAP application, click Tools - Options - Performance, and click the Compute button as shown.
It worked for me.