Initialse method for datapacks?

I am very new to datapacks so the only stuff I have done is executing commands using /function.

I am trying to integrate the armour weight mod to epic knights gear, and it asks to put WeightUtil.addElement(your_weight_def); referencing my json definition in the "initialise method" of the datapack after defining the weight data for an item, so it gets registered in game. I am not sure how do do this, how do I create an initialise method?

Continue to help post