Open the Minecraft Launcher
Go to Installations
Select the profile you want to edit
Click More Options
Find the JVM Arguments field
Locate the RAM value in the argument, such as -Xmx2G
Change the number to the amount of RAM you want to allocate, such as -Xmx4G
Save the profile
Make sure not to assign more RAM than your computer can safely spare
Launch Minecraft with the edited profile
