@Rofa Filesystem type definitely plays a role. Some are more prone to corruption than others.
NTFS (which you said your flash drive is using) is generally the most reliable of the bunch as of now, it’s designed with journaling (it keeps track of metadata changes before they happen) So if something crashes mid-write, NTFS can usually roll back to a safe state. That’s why it’s used by default on internal drives and Windows installs.
But the journal can’t protect everything. If the drive is suddenly disconnected before data finishes writing, or worse, there’s a hardware-level problem, NTFS won’t save you.
As for FAT32 and exFAT -- they’re definitely more prone to corruption. They’re just simpler. If something interrupts a write on FAT32 it can easily get messed up. It uses something called a File Allocation Table (FAT) to keep track of where your files live on the drive, and it keeps 2 copies of that table. But if power cuts out while it’s updating one and not the other, they can get out of sync. And there's no checks to catch that, so it just breaks.
You can end up with so-called “orphaned clusters” (chunks of files that are just floating there not tied to anything), or your files might open and just show garbage data. Sometimes CHKDSK can patch things up, but not always.
exFAT is newer, but it also doesn’t have journaling. It only has one FAT and it relies on a bitmap too. If something goes wrong while writing, you might end up with files that don’t open (or evenoverwrite each other).
EDIT: @HopeInSleep you’re right, in most cases, simple formatting will repair it. Just don’t forget to recover files from corrupted file system first. Little reminder for @Rofa so you don’t nuke anything important next time.
Also, formatting isn’t the only option. There’s also CHKDSK (or the “Error Checking” tool you can run from the drive’s Properties window, same thing under the hood as CHKDSK), and tools like TestDisk. In some cases, those can actually repair a damaged partition table or fix broken FAT tables.
I’ve seen TestDisk bring some drives back from the brink without formatting. But if you don’t care about what’s on the drive (or already got your files off) formatting is definitely the surest + simplest way to do this.