There are a few possible reasons why your QuickTime screen recording didn’t save (and what you can do to fix it):
Interruption by a sudden shutdown – Check the QuickTime Autosave folder and macOS Temporary Folder. For detailed instructions on how to locate both, read the full article.
Invalid save location – Try changing the save file destination for your screen recordings.
Interruption by background apps – Force quit unnecessary apps. On the menu bar, click the Apple icon > Force Quit…