For anyone struggling with this (I tried the first guy's answer and got error after error), I believe I found a way that is WAY simpler. Credit to this website - https://www.windowscentral.com/how-rename-multiple-files-bulk-windows-10
Put all of the files you want to trim the names of into one folder. Open CMD to that folder (in Windows 11, you can right-click while you're in the folder and select Open In Terminal. For me, it opened PowerShell, so I had to type cmd
and hit enter first), and read the next part.
'ren' is the rename command. '*' means 'anything' (from what I understand), so '*.*' means 'any filename and any extension in the folder.' And finally, the amount of question marks is the amount of characters to keep. So '???.*' would only keep the first 3 characters and would delete anything after that while keeping whatever filetype extension it was.
So if you had multiple files with filenames formatted YYYY-MM-DD_randomCharactersBlahBlah.jpg and .mp4 and .pdf, you'd want to keep only the first 10 characters. So you'd open CMD in the folder and type:
ren *.* ??????????.*
The new filename would be YYYY-MM-DD.jpg or .mp4 or .pdf.
Just be careful, because if you have multiple files with the same date in this scenario, they'd have the same filename after trimming which causes CMD to skip that file. Hope this helps someone.