Yeah, "Error writing to database disk" definitely sounds like the system disk is out of space. Rectify that immediately, as you're at risk of not being able to save the project.
If you have Render Cache enabled, then that's likely also writing to the system drive, which will be using more space and could explain why you're running out of space unexpectedly.
You really have too little RAM to run Resolve, and if you have any other programs open at the same time (email client, web browser, background programs) you may well be swapping - which will use more disk space.
I'd try and have at least 50 - 100 GB free on the system drive to give yourself a safety margin. And keep an eye on free space as you're using Resolve.
First thing I'd do for freeing up disk space is to check your CacheClip folder, see how much space it's using. If it's huge, it may contain old render cache from other projects. You can load each project and then Delete Render Cache -> All to clear out the cache for that project. You may not want to do that for your current project if you know you're using render cache (blue line at the top of timelines), but definitely do it for any old projects you're no longer working on.
If you want to know where all your disk space is going, then I use
DaisyDisk. It has a free trial period, and it's only £5 in the current Black Friday deal. It's a useful app to very quickly find out what's taking all your disk space. It gives you a top level summary, then you can drill down through each level.