Here's a screenshot of where you'll change that. When you open the launcher, click Installations at the top of the window, then click the button with three dots on the right side of the installation you want to adjust. When you get there, click Edit, then at the bottom click More Options. You should see the line highlighted in the screenshot. The circled five is what your current amount of allocated RAM is, so just change the five to whatever amount you want it to be, just don't change anything else. Then you should be all set!
Start the CurseForge App, then click the Settings button at the bottom left. In the next screen, select Minecraft under the Game Specific section. Afterward, scroll down until you see the Java Settings category. Once there, adjust the bar for the Allocated Memory area to increase RAM. My Sanford Chart