how to create custom weapons and items in a mc datapack

Im trying to make items in my 1.21.3 but i dont know what i have to do to the item to make a seperate item that i can retexture and give custom attributes and abilities to. idk what to add to the code and or how to make cmd code

Continue to help post