When Windows crashes, it collects information about the crash during the time that the Crash Screen is displayed. At this point, the OS collects information from running applications, drivers, ...
If System files are using hundreds of gigabytes on your Windows 11 PC, a bug tied to CapabilityAccessManager.db-wal may be responsible.