If the Media Storage cache gets corrupted you may have an issue with files not showing when you connect your Android device (which includes Kindles) to your computer with Android File Transfer (Mac) or the equivalent file manager in Windows. In my case the symptoms were no files showing in Android File Transfer's (external) "Storage" tab even though they were definitely present on the micro SD card (could be seen in an Android file manager and when the card was mounted on the Mac desktop with an external card reader). Rebooting devices, reformatting card, etc. did not help. Internet sources said I needed to clean the Media Storage app cache, but while there was info on doing that in phones, there was no info as to how to do that on a Kindle. Here's what worked for me (5th gen Fire).
Install on the Kindle a file manager that allows you to access system apps. (I use EF File Explorer v. 184.108.40.206, which still works on Fire OS 220.127.116.11 and is the last version of EF File Explorer free from bloatware and ads - Google is your friend if you need this version - and be sure to set its preferences not to update the app. And if you're trying to sideload an app and the install button is greyed out, you need to short-press the power switch off and back on to enable the install button - apparently something that just happened in Fire 18.104.22.168).
Navigate to "System Apps" and look for "Media Storage." You can't "open" it, but if you long-press it in EF File Explorer, then select "More" (three dots in the bottom menu/toolbar), then "Properties," the app will open in the Fire's stock application manager and give you the option to clear data and cache. I cleared both.
Reboot the Kindle and wait awhile for Media Storage to rebuild the cache and file list.