adb server can use -P to open a custom port.
However, scrcpy always checks the default adb server on 5037
If 5037 is not opened, it will run adb start-server on the default port 5037
How to make scrcpy run with a custom port adb server

adb reads the environment variable ADB_SERVER_SOCKET:
export ADB_SERVER_SOCKET=tcp:localhost:1234
scrcpy
thanks a lot!
If I start multiple adb servers on different ports
How to run multiple scrcpy and specify different adb port?

Just execute each scrcpy with a different value for the environment variable. For example:
ADB_SERVER_SOCKET=tcp:localhost:1234 scrcpy
ADB_SERVER_SOCKET=tcp:localhost:1235 scrcpy
thanks!