Minecraft 1.14.4 Teleport in multiplayer mode a different player relitive to them selfs from (Datapack) function called from command block

To clarify what @Fabian Röling meant, the reason your commands do not work is because you are using the @p selector instead of the @a selector. Your command, execute at @p run to @p ~-1 ~ ~, means run this command at the nearest player and teleport the nearest player to that position -1 blocks in the x direction.

What you really want is

execute as @a at @s run tp @s ~-1 ~ ~

which means run this command as all players, respecting each of their positions, and teleport each of them relative to their position -1 blocks in the x direction.

If this isn't what you want, I recommend clarifying your question.