Thanks to CryoByte who made the script and the video guide
Stop Crashes and Update VRAM
Install CryoByte’s script from github found here: https://github.com/CryoByte33/steam-deck-utilities
Step 1: Set a password in Konsole command using “passwd”
Step 2: Go into desktop mode. Go to GitHub link. Scroll down to install heading, then easy subheading, right click and save the link.
Step 3: Go to downloads, execute the file.
Step 4: 3 New icons on your desktop, double click CryoUtilities and enter the password you entered in step 1.
Step 5: Swap file from 1 to 16(if you have space for 16gb) should only take about 20-30 seconds.
Step 6: Swap value from 100 to 1.
Step 7: Swap disabled trim to enabled, run trim right now.
IF YOU UNINSTALL THE SCRIPT IT WILL NOT REVERT BACK TO YOUR ORIGINAL SETTINGS.
If you are unhappy, re-run script and undo all the settings mentioned above before uninstalling.
Step 1: Power down your Steamdeck until screen completely black
Step 2: Hold volume up and power button until you hear the boot up noise.
Step 3: Go to bottom right icon “Setup Utility”
Step 4: Go down to advanced settings
Step 5: Go to UMA Frame Buffer Size and change value from 1G to 4G.
Step 6: Press steam deck select button, then select yes when asked if you want to save and exit.
Steam Deck will then reboot and you will be done.
Skip to 12:53 for the script tutorial
Skip to 21:49 for the VRAM tutorial