I guess having backups that aren’t on your computer is a common response to this. Like an external drive or cloud storage.
However a bad or buggy driver shouldn’t delete your files. Since you were able to fix your computer that means the hard drive wasn’t fried.
If something happens where you can’t boot into windows to access your files you can always boot from a flash drive instead to access what’s on your hard drive. Those are pretty common to find online. They often include tools to access files even if the file system is corrupted or the file was deleted. Even if you can boot into windows and delete a file by mistake there are tools to undelete it as long as it’s not overridden by something else. The other benefit of booting from a flash drive is it won’t be creating new files on your hard drive and possibly overwriting files you deleted.
All deleting a file does is to remove the reference to the file on the hard disk. The contents of the file is still there. However the file system is no longer protecting that portion of the drive so it can get overwritten if a new file is created that happens to use the same area. So in short, if a file is deleted you can often undelete it soon after, but wait too long and it’s probably mostly gone.
A common way people fix a corrupted windows install if to factory reset the drive to a working state which overwrites the whole drive to how it was when you got the computer. Unfortunately there isn’t a whole lot that could be undeleted after that.
Anyways, my point is there are ways to get deleted files back or even access files on a computer that isn’t booting. At least short of the hardware being fried or destroyed. And even for that there are companies that will do data recovery from destroyed or fried hard drives if the data is important enough to you to pay for.