The "Machine Check" error in the Kernel Panic indicates a hardware issue of some sort. Make sure to disconnect all external devices in case one of them is causing a problem.
You still did not answer the question of the make & model of the memory you removed before installing the Corsair memory. This is a very important detail.
I would remove the new Corsair memory and install one of the old memory modules to see how it work. If you still have issues, then remove that module and try the other older module. Also try installing a single stick in a different memory slot to make sure the slot is not bad. FYI, it is unlikely for two memory modules to fail at the same time.
Since this Corsair memory seems to be branded for Apple, it may be Ok. I have no personal experience with it since our organization usually uses Crucial or possibly OWC at times.
Try running the Apple Diagnostics to see if any hardware issues are detected. Unfortunately the diagnostics rarely detect problems, but if it does...at least you know there is a hardware problem.
You can try running Memtest86 to check for memory issues. If the default settings don't find a problem, then modify Memtest86's CPU option to "Round Robin" or "Sequential" to see if it errors or perhaps even freezes.
The Samsung SSD may also be a potential issue since the EVO series especially seems to be more problematic with Macs. You may want to test the iMac by installing macOS to an external USB3 SSD and booting externally to see if you still have the problem. It isn't a perfect test, but if this works, then it may point to a issue with the internal Samsung SSD.