I am new to Linux and programming. My question is similar to this one but I am running a Raspberry Pi 4 headless with no desktop [buster lite] which does seem to automount the usb drives. I haven't found a non-janky way to automatically mount USB new drives so that their path will be predictable. This RPi4 has a sensor and I want it to automatically save the sensor data onto any thumbdrive that is inserted into it. I can just periodically unplug the drive and put in a new one, then go back home. I need to be able to use any fresh USB drive, not just reusing the same few. The rest of the work I am doing is on python but this function could be carried out separately without python. This solution needs to survive reboots of the pi.
Appreciate everyone's help. As I am quite new, I'd especially appreciate explanations of what you're recommending.