Read - construct.net/en/tutorials/multiplayer-tutorial-concepts-579
You'll need to understand the differences between the host and peer, what data is being sent between clients, and that what each client sees and the information that each client has at any given time is different. Netcode is generally about how to hide the effects latency from the point of view of each individual client, rather than making everyone see or have the same information at any given time.