You add variants to a product that comes in more than one option, such as size or color. Each combination of option values for a product can be a variant for that product.
For example, suppose that you sell T-shirts with two options: size and color. The size option has three values: small, medium, and large. The color option has two values: blue and green. One specific variant from these options is a small, blue T-shirt. Read official documentation how to add variants
Steps:
From your Shopify admin, go to Online Store -> Themes.
Find the theme that you want to edit, and then click Customize.
Click Theme settings -> Product Card -> Product Swatch.
Product Swatch?
Toggle to show or hide product swatches on Product Card.
Size of Swatch on PC
Fill in the desired size of a swatch on Product Card on Desktop.
Size of Swatch on Mobile
Fill in the desired size of a swatch on Product Card on Mobile.
Size of (+Number)
Determine the font size of the text showing the remaining number of swatches if the total swatches amount is more than 3.