Below are the steps to display the image from the simple product in Cart and Mini-cart when you have configurable products or grouped products in your catalog.
Step 1. Go to Admin sidebar tap Stores → Settings → Configuration → Sales → Checkout
Step 2. Expand Shopping cart section
Step 3. Set Grouped Product Image and Configurable Product Image to
- Product Thumbnail Itself
Step 4. Save by clicking Save Config