How to sync movement in authoritative multiplayer?

Hi everyone, I kind of get stuck at syncing the movement of the player in authorized multiplayer.

Here is my case:
I am using Unity as the client. I know the basic theory of client prediction and server compensation. But I don’t know how to do it when working with physics. Like I can send the command to server when the player presses Move Command. Then the server will send back the new location it should be. But how does the server has the awareness of whether there is an obstruct there? If it is a platform game, how does the server know if the character should fall if the new location has no platform?

To sum up, how does the server have the awareness all the environment? How does Unity and Nakama server work to solve this?

Any help will be appreciated!