Since the normal command has not worked since 1.12 and I don't really have anything to do with command blocks, I have to ask, how do I get a stick that gives me speed 2 or a stick with knockback 7?
https://www.gamergeeks.nz/apps/minecraft/give-command-generator
Since you don't write which version you are playing, you have to do it yourself. Knockback is an enchantment, speed is an attribute. If you enter your Minecraft name above, you can give the sticks directly with the command. Without a name, you have to enter the command in a command block.
/ give @p minecraft: stick {Enchantments: [{id: "minecraft: knockback", lvl: 7s}]} 1
/give @p minecraft: stick{Enchantments:[{id:"minecraft: knockback", lvl:7}]} 1
/give @p minecraft: stick{Enchantments:[{id:"minecraft: knockback", lvl:7}]} 1
/give @p minecraft: stick{Enchantments:[{id:"minecraft: knockback", lvl:7}]} 1
/give @p stick{Enchantments:[{id:"minecraft: knockback", lvl:10s}]} 1
/give @p stick{Enchantments:[{id:"minecraft: knockback", lvl:255s }]} 1
/give @p stick{Enchantments:[{id:"minecraft: knockback", lvl:255s}]} 1