Arduino serial to text.file

can you use the write() function on an USB drive?

No

You could use a terminal emulator such as Coolterm to receive the Serial output from the Arduino and save it to a file. Alternatively you could save the file to an SD card in a reader connected directly to the Arduino

You can if you have a USB Host Shield (or equivalent) and the drivers for opening a file on a "USB Drive".

For mass storage, an SD Card is generally preferred because it doesn't require as much interface hardware.

Once you open an output file you can use file.write(), file.print(), file.println()... same as you would for Serial.