Pygate needs a lot of RAM. As suggested in the docs you can turn off LTE or Wifi (whichever you don't need) https://docs.pycom.io/tutorials/expansionboards/pygate/#setup