How to make automatic stock out of raw materials once finished/main product is stocked in?

Kindly go to the inventory >> Select grouped product >> Click on stock in>> Enter the quantity for finished/main product >> Scroll down>>Enable stock out raw material >> Click on add quantity.