Player syncing

We have an issue in syncing the player position we tried the same logic in Nakama fish game and it does not working there is a lag the second logic we tried is store the initial position in a vector and when the player start moving store the new position and subtract the new one from the old one and we store this vector in a vector called direction then send that vector over a network in addition to the current position, in the remote player script we add the direction vector to the position that we have received the leap the current position to that added vector this worked the lag its gone but there is a delay
The component we have the navmesh agent component to move the player what we can do to solve this problem
The leap time we used for the receiver:
0.5 ==> the local player ==> 0.5
0.02 ==> the local player ==> 0.01
0.09 ==> the local player ==> 0.08
0.09 ==> the local player ==> 0.08