In Magento 2 It is possible to add shipping charge if specific category product is available in cart.
If not then please suggest me another way.
Thanks in advance..!
There is no such feature is available but you can do this by creating the cart rule.
Please follow the below guidelines
Go to the below location
Magento_admin > Marketing > Promotion > Cart Price Rule
Click on Add New Cart
Fill the form for the customer groups select the appropriate customer to whom you want this rules to be applied, in the coupon dropdown select
No coupon so that no one require to apply the coupon for getting free shipping, select the date range.
Now Go to the Actions tab, there in Discount Amount give 0
Apply the rule only to cart items matching the following conditions (leave blank for all items) section follow the below things.
For matching items only.
Save the cart rule & set the required shipping method that you want to apply on the specific categories that you have not selected into the cart price rule & now test it it will work
Explanation: Here what we have created is we have created a shipping method for all the products/categories & then we created a cart rule to eliminate those categories on which you don't want to apply the shipping charge. So ultimately you are having the feature of shipping method on the specific categories but in different manner. :)