Assigning tags to product options that consist of other products, and checking for them on the cart

I am looking for a way to carry over tags from products that become options for another product, then checking for these in the cart under the parent product’s options.

Kind regards,

Callum