Out of memory errors aren't ram, often they are page file, have you altered it at all? It seems you may not have had space in the page file to extract Discord out of its zip file. That isn't normal for the app since I have it installed... I would have remembered.
Is it only discord or all apps? if you haven't altered the page file, try this
right click start button
choose powershell (admin)
type SFC /scannow and press enter
once its completed, copy/paste this command into same window:
Repair-WindowsImage -Online -RestoreHealth and press enter
SFC fixes system files, second command cleans image files, re run SFC if it failed to fix all files and restart PC