1. HSN code depends on the category of a product.
2. Go to Product -> Categories, and click on “Add”. Add category name and category code. The category code is the same as the HSN code.
3. To display the HSN code in the invoice – Go to Settings -> Invoice Settings -> invoice layouts. Add/Edit invoice layout and click on ” Show category code or HSN code”. Save it. Assing that invoice layout to your business.
Check the details guide on invoice format & designs