Systemctl start docker crashing system (probably memory consuption)

I can’t even debug what is happening because my only option is to restart the system. When starting docker with system monitor already activated, i noticed that all my system memory was consumed, so i guess this is the root of the problem? I already saw many suggestions about limiting docker’s memory usage, but all of them require docker to be running in the first place. Any suggestions about what i could do?

Operating System: Fedora 36 Linux
kernel: x86_64 Linux 5.18.5-200.fc36.x86_64
Memory: 8gb ram and 20 gb of swap memory
CPU: Intel Core i5-8250U @ 8x 3.4GHz