Link product and product category in order modules as relate fields


Would you mind helping me with this? II have both modules, product and product category.
These two are related fields in other modules.

In the module I called beneficiary, I have the product in edit (create) and both product and product category in Detailed (view). if I enter a product in create, the product category should be updated accordingly.

I can do it in workflow one product at a time but I have 300 products spread across 4 categories

How can I link a product to product category?