In general, you're supposed to use the MicroPython remote control: mpremote to update files on a MicroPython device.
However, if you are expecting end users to do this, and they aren't very technical, you might want to create a firmware image as a UF2 file that contains both the Python interpreter and your code (either as filesystem or as frozen MicroPython modules). Then have the user install that file using the RP2040's built-in USB bootloader, which requires no additional software installation. Also, doing it this way ensures they are using the right version of MicroPython, which you've already tested with that code.