Can we add a tax rate for the main product and give different tax rates for variants?

No, this is not possible at the moment. The system does not support assigning separate tax rates for variants while maintaining a different rate for the main product.