need Help with a player only effecting enchantment

i am using MC 1.21.1 very new to datapacks and modifying minecraft stuff in general. apart from putting mod packs together, i have made a new item that all players get on spawning in. i have given it a custom enchant that gives knockback. but i want it to ONLY effect other players. otherwise its just a normal stick. is that even possible??
Continue to help post