How can I track inventory of variable products easily?

Hello, wise people of the internet. I run a manufacturing company that makes and sells variable products. For example :

Main item

can be combined with

Extras - A,B,C or D

Is there a simple way to track stock of the ‘extras’ across multiple “main items”?