Routers can cause lags and latency. Bypassing them always improves performance.
Configure your Windows PC or Android device as WiFi Access Point (Hotspot) and connect to it before connecting spacedesk.
USB Tethering and Android Debug Bridge cable connection can also achieve the same result.
Please check the “Performance Tuning” chapter in the user manual: https://spacedesk.net/user-manual