think of it like this, every action (for example building) should only ever happen on the server,
all the player sends is input, ie (i want to build here)
how much you verify that input to stop cheating depends on you.
good luck, replication is tricky when you start but it does get easier