Use the Pair Devices Using Wi-Fi feature in Android Studio's Device Manager.
This is the best method for Linux developers. For Windows and macOS, continue reading. connect usb device to android emulator better