need help with categories

so, i’m making a small tier addon for me and my friends to use, just adds some new ores, tools, armors and such, i just wanted to know if there’s a set way to make something like swords in a certain way? like if i didn’t want it sorted by wood, stone, iron, gold, diamond, netherite, and wanted it sorted by durability, so gold, wood, stone, iron, diamond, netherite (for example).

tl;dr: guy wants to sort things differently in categories separately, and doesn’t really have the know how to do so.