I have 2 approaches: USB and wifi with an sftp drive for windows.
USB requires me to copy a file from the device to windows, edit, and then copy it back with windows file explorer. I can't just edit a file in place, not sure why.
However, I am quite fond of a set of *magnetic* charging/data cables I use with all my devices now (incl. flashlights), and this one,
https://www.amazon.com/gp/product/B08RD7N1WB
is for both charging AND data transfer. Note other types, with a single pin in the center only do charging. These are super cool/fun to connect :)
For full r/w compatibility, I use this
https://www.nsoftware.com/sftp/drive/
They have a free and paid version. The paid version (~$30) allows 2 or more connections simultaneously; I got it since I have several phones and tablets.
As a windows drive letter (one per connection), the right-click menu fully works where I can then use beyond compare, powergrep, editpadpro, and several other utilities and I can just edit in place, no need to transfer first.
I can also do file folder compares (with beyond compare or winmerge) between 2 phones, in particular the home folders where all my androwish stuff is on each device. Easy to then keep them all in sync.
I use the SSHDroid app on android as the server.