You can allocate more RAM from the ‘Installations’ tab on the Minecraft Launcher. Select your profile, click ‘More Options’ and adjust the JVM arguments.