You need scrcpy and adb
https://github.com/Genymobile/scrcpy
You need to enable ADB debugging (USB and WiFi) Depending on your phone this can have different naming conventions.
I set it up first normally with scrcpy via USB for testing, and then I use the script above. Be sure to replace <PHONE_IP> with your usual phone's local home IP (e.g. adb connect 192.168.1.120)