Crafting in D&D 5e isn't very well defined, but it generally involves a material cost (usually half of the sale price in gold, unless it requires special ingredients or something like that) and time (downtime proportional to the amount of work that needs to be done). Some of this is described in the Player's Handbook and the DM Guide. There's a lot more in Xanathar's Guide to Everything, but much of it is still on the vague side. There are a lot of good homebrewed rules for crafting. I haven't seen any version that involves an XP cost.