You can easily configure the shipping rate to charge based on amount, quantity, weight, product’s fixed rate, etc.
The rate formula can also use XSL transform to calculate the shipping charges. The expected output should return the calculated shipping amount to charge. The Storefront comes with several pre-defined rules that you can simply modify the values without needing to know XSL. To learn more about XSL, please see the XSL Transform
On the Catalog > Products menu, you will also want to tick the Require shipping checkbox on your product variants. This ensures that only those products will participate in the shipping calculation. If your shipping method is using the "Product rate" rule, it will use the amount entered in the product variant's Shipping price field to calculate shipping charges.