Tax will be calculated based on your store settings at WooCommerce >> Settings >> Tax.
In this section, users can configure the Tax classes, Shipping tax class, Additional tax classes, Tax in price display in shop, cart & checkout, and Tax total display.
Then in the General tab of the composite product page, choose a Tax rate and tax class for the current composite product.