how to fix memory on laptop?

If you aren't getting enough memory for your laptop, you may need to upgrade your RAM. If you have free space on your hard drive, you may also be able to use a cloud storage service like Dropbox to bring things into your laptop without using as much memory.
Run antivirus software for a full system scan.

Close the programs that are using too much memory.

Use Windows troubleshooter.

Manually increase virtual memory.

Repair corrupted file system.

Update Windows to the latest version.

Clean junk and temporary files and folders.
try this if you have a computer with a spinning hard drive:  1. Unplug the computer.  2. Remove the battery.  3. Remove the hard drive.  4. Shake the hard drive while it's out of the computer.  5. Reinstall the battery and hard drive.
There are a few things you can do to try to fix the issue. First, try restarting your computer. Sometimes, the memory on your computer is just unstable and the best way to fix it is to restart your computer. You can also try turning off some of your open programs, if any.
If you’re having problems with your laptop or computer that’s not allowing you to remember anything, it could be something as simple as the battery. Make sure it’s charged and that it’s plugged in.