If you want to connect your Starlink Router to another router, for instance an Ubiquiti Dream Machine or Unifi Gateway, then it is best practice to set the Starlink router to Bridge Mode.
As plugging the Starlink straight into the Unifi router you work but as the Starlink is also acting as a router, this causes double NAT problems on your network, particularly for gamers.
To prevent double NAT, you need to turn off the router functionality on the Starlink by putting it into Bridge mode.