Question: how to make a command block give enchanted items?
Answer: First, you need to program the command block to give an enchanted diamond sword with the /give command. This /give command will be run each time the command block is activated. So, stand in front of the command block with your pointer (the plus sign) on the command block and click on the right mouse button.