How can we create a template in this format?

Can you refer us to any material and how we can make it like this?

You can use frappe Print designer

or
You can create custom print formats in Jinja templates.
https://frappeframework.com/docs/user/en/desk/printing
https://docs.erpnext.com/docs/user/manual/en/print-format

I’m creating a print template based on the attached template. SGST, CGST and IGST of individual items should be fetched and its sum should populate in the marked fields respectively. Could someone help me with the code on how to do this with Jijna template in ERP Next using existing fields?