How to record audio and save it to wav file using Electret Mic Amp - MAX9814?

Yes, ...

... or another possible condition could be based on the System.resetReason().

That's what I meant when I previously said

(apparently replugging the entire system suffers the same issue)

But one difference between cold power-up and reset is that the 3.3V rail - which supplies the SD card - stays powered across a reset but does (obviously) not so when cold-booted or un-/replugging the SD.