Hello and welcome to the forum
RAM isn’t an ‘annoying feature’ of krita, it’s what your computer has. It sounds like yours doesn’t have enough of it, at least not for the work you’re trying to do.
Can you do Help -> Show system information for bug reports and paste the window contents in a reply? (Or use a pastebin link which makes things easier to read.)
What is the RAM usage for the animation with problems, as noted in the status bar on the right side?
If you set the RAM memory limit to maximum, that can give all sorts of problems such as crashing.
It sounds counterintuitive but you can reduced that risk by reducing the Memory Limit slider but if your computer has only a small amount of RAM. e.g 4GB, there’s not much scope for that technique.
There are various ways you can reduce the amount of RAM used. The obvious ways are to use smaller image sizes, fewer layers with content and shorter animations.
Also, don’t have any other applications running at the same time, such as a browser playing YT music videos, etc.
There are other techniques such as trimming off-canvas content and doing Save and restart after a while to get rid of the data needed for Undo actions but does sounds like you don’t have enough RAM on your computer.
You may be able to add more but it’s not a trivial/casual thing to do unless you’re used to doing that sort of thing.