As per my title suggest, what is difference between Screen.orientation and Input.deviceOrientation?
Input.deviceOrientation is telling you the actual way the device is being held. It changes as they tip the device, but it won’t spin around your game. It’s just reporting, in case you want to do anything.
Screen.orientation is a variable, which you can use to spin the screen. If you set autoRotate, it will somewhat track deviceOrientation, which might be the confusing part. Simple code will read deviceOrientation, and use it to set screen.orientation.
deviceOrientation is 3D whereas Screen.orientation is always pointing at your face, so 2D.
deviceOrientation also includes Face Up, Face Down and Unknown as well as all the Screen.orientations portrait and landscape.
Also, Screen.orientation is handled by Unity but deviceOrientation is reported by the OS.
Seriously though, you can read both pages from the docs and see this for yourself!
Also, dont forget that the Device can have a different screen orientation independently of the way the device is pointing. FaceUp or FaceDown it can still be in portrait or landscape.