Google advises using the item group ID [item_group_id] attribute to group product variants in the product data.
Variants are a group of similar products that only differ from one another by product details like size [size], color [color], material [material], pattern [pattern], age group [age_group], and gender [gender].
In order for Google to receive all relevant data per each configurable product's option, please, include simple not-visible-separately products in the feed, and, on the contrary, exclude configurable products from the feed.
You can do this with the help of the following settings:
And conditions:
The second step would be to make Google understand that the simple products are options of the same product, to output your product and its variants to customers as a group instead of separately. This is achievable by adding the item group ID [item_group_id] to each simple product, along with its unique ID. To do so, please, add the SKU attribute to each simple product twice. One field, marked as Parent=No, will pull each product's individual SKU; the other, configured as Parent=Yes, will output the SKU of the configurable product:
The best practices of submitting configurable products to the Google Merchant can be found in our guide.