How do I minify inline CSS using Twig?
This is not the right way to integrate a .css file inside a twig file in drupal8. You should use the standard procedure as I mentioned below.

 {{ attach_library('bartik/messages') }} 

SO now for minifying the .css  you can use the 3rd party site- https://cssminifier.com/

So the after minifying the .css file, crate the library 


messages:
  css:
    theme:
      css/components/my-minify.css: {}


Then attach the library in the twig by using the below sysntax


{{ attach_library('your-theme-name/messages') }}


Hope this will help you. If any doubt please don't hesitate to mention.