okay so i sorta got it
i added
public static final LegoMold legoMold = new LegoMold();
and changed line 20 to
public static final RegistryObject<Item> LEGO_MOLD = ITEMS.register("lego_mold",
() -> new Item(new Item.Properties().group(LegoModItemGroup.LEGO_MOD).maxStackSize(1).containerItem(legoMold)));
and now it works but instead of giving me back the mold but damaged it just gives me a air block so i assume i need to tell it what item to give?