How to enchant any throwable projectile? Such as knockback

Hello,

I found out recently that you can enchant any throwable projectile with any enchant such as knockback. So I do wonder how to do that because I want throwed snowball to be able to hit player then they'd get knockback.

I did try experiment many time but couldn't figure it out. /enchant didn't work. I also tried /give @s snowball[enchantments=]

But these both didn't work.

Continue to help post