If you have a media where you can store the Rom on, there should be no problem.
Just an USB C to USB A Dongle and plug in an USB Stick to the phone after formating everything - or has TWRP no USB Storage permission?
Edit: For which phone model? Redmi K40 has TWRP version, but I'm not sure about the other versions