Do you have restored a backup before, for example, a month or earlier with twrp and still the same?
If the same way, it can be damaged partition table.
TWRP mode NO files are placed in the cache, but MIUI certainly uses cache.
.
Reformatting of sdcard helped