In this video, I attempt to run Minecraft: Java Edition version 1.21.1 with very small amounts of RAM allocated to the game.
To change the amount of RAM allocated to a Java installation, go to the installations tab, press the triple-dots button next to the installation you choose, then click 'More options'. The JVM argument that determines the maximum allocated RAM to the game is the -Xmx flag, typically displayed as -Xmx followed by a number and a metric prefix (e.g. M or G), and defaults to -Xmx2G.
I do not recommend you set it any lower than 1 gigabyte (1G or 1024M or 1048576K), or any higher than half of your computer's total RAM.
Thanks for watching, and have a nice day.