babygirlatwell Please check your antivirus for any Sims 4-related actions. The "out of memory" error is often AV-related, as is the inability to load images from the Gallery. Freezing when exiting CAS is more generic but can be caused by an antivirus as well.
If your AV isn't blocking the game, or you don't think so, it's still worth disabling it temporarily, just as a test. As long as you don't do anything else at the same time, your computer should be safe.
If the AV is the problem, set exceptions for TS4_x64, TS4_Launcher_x64, TS4_x64_fpb if you use or want to use the Memory Boost feature, TS4_DX9_x64 if you use DirectX 9 mode, and EADesktop.exe as well.