execute at @s[type=minecraft:player] run summon minecraft:wandering_trader
execute at @s[type=minecraft:player] run data modify entity @e[type=minecraft:wandering_trader,sort=nearest,limit=1] wander_target set value [I;0,0,0]
execute at @s[type=minecraft:player] store result entity @e[type=minecraft:wandering_trader,sort=nearest,limit=1] wander_target[0] int 1 run data get entity @a[sort=nearest,limit=1] Pos[0]
execute at @s[type=minecraft:player] store result entity @e[type=minecraft:wandering_trader,sort=nearest,limit=1] wander_target[1] int 1 run data get entity @a[sort=nearest,limit=1] Pos[1]
execute at @s[type=minecraft:player] store result entity @e[type=minecraft:wandering_trader,sort=nearest,limit=1] wander_target[2] int 1 run data get entity @a[sort=nearest,limit=1] Pos[2]