It doesn't seem to be available in standard themes, however can be customized and a workaround arrived at
If you want existing app then you can see here ( we are not affiliated and it's just a suggestion)
You can also get it custom made by hiring a developer from the community.
@YuliyaP for the standard app, kindly look in-app store for customization send me a private message
Hey there @YuliyaP .. Let me know if this helps :-
Product can be set free - you can either offer 100% discount or you can give price as $0 and charge shipping price on the basis of profile creation.
To create shipping profile, Go to settings -> Shipping and delivery -> There, create a custom profile and add that product and give your custom rate!
For discount code creation - Go to discount -> add on the basis of percentage and give percentage as 100% in order to give total off but in order to not to be losing case charge the shipping price.
Let me know if it helps!
Nick here from Shopify. Great question!
As @Propero mentioned, the best and most efficient way to achieve this would be via an app and the Multi Vendor Marketplace app seems to be the best app for this. I couldn't find any others who state this outright. The app is $10 a month also.
Also mentioned was having something custom made for you by a Shopify Expert. While this would be a much larger upfront cost, it would be a once off type of payment and not monthly, but this would also be yours and built into your store directly. You can see the full Shopify Expert directory for custom apps here. It's difficult to have an exact price as every expert could quote something different. It would definitely be worth your while to research and find an expert you resonate with and ask for a quote on what you're looking for.
Hope this helps add to what the others said previously.