Yep, you guessed it! A new version is coming soon, v18.0.2 which will address that issue. If you need to get around the issue for now, then just restart the dashd several times during syncing to reclaim that RAM before it crashes.
Related PR: https://github.com/dashpay/dash/pull/5007
And a temporary alternative to restarting or waiting for a new version: https://github.com/dashpay/dash/issues/5012#issuecomment-1246059549