We have zero information about your system, which filesystem is used on that partition and where and how it is mounted.
As of now, only you know that.
There is probably something hinting at the cause in your system logs when you examine the previous boot cycle(s). sudo journalctl --list-boots
and then select the one where it occurred sudo journalctl -b _some_number_or_ID_
see: man journalctl
or search the net to find how to use it to get you the information
Of course there are also graphical log viewers that may be already present in your (KDE?) system - I don’t know about them because I have never used them.
That’s because the unclean filesystem was not mounted in the first place - that’s why you got that error and failure to fully boot and got presented with an emergency shell - from where you could run the fsck commands on the not yet mounted filesystem.