Composer killed when installing a module
You ran out of memory. This happens all the time with Composer.
Composer is a huge memory hog, especially when used with Drupal because of all the external interdependencies. And Drupal's requirements continue to grow with every new release, so the memory needed to use Composer with Drupal continues to grow. 4Gb of available memory should be enough, currently, but 2Gb is not enough in my experience. I find this problem can be avoided if you configure your system with sufficient swap space (2x physical memory is usually sufficient). This is for a development system of course - you won't be using Composer to install modules like that on a production system, you should be using a .lock file instead, so Composer's memory requirement will be much smaller.