Let's take a real-life example. When iPhone launched with the Red color, it was only available with a storage capacity of 128 GB and 256 GB, other than that the Red color was not available.
Odoo creates a variant for all the possibilities based on the product attributes. You can choose later which are the available variants and deactivate the variant which is not as per the product specification.
To deactivate some product variants which are not available as per the product specification, go to product page, click on the Product Variant button, you will reach the variant list. Open the form view of the specific variant you want to deactivate, in our case we have to deactivate two variants: Storage—32 GB, Color—Red, and Storage—64 GB, Color—Red, as shown below.
Uncheck the Active field available on the Variant form and click on the SAVE button. Let's check on the product page, how it will restrict the user to select the 32 GB with Red color iPhone, look at the following screen:
As soon as the user selects either 32GB or 64GB in storage capacity, the Red color will be disabled and not allow selection by the user as this combination of the product is not available as per the product specification.