This is why you need to back up! Unfortunately, most people dont take backups seriously until their hard drive fails, when its too late. Happened to me 🙄
Its really easy though. Just pick up an external HD with a decent amount of storage and plug it in, then when it asks if you want to use it for Time Machine, choose yes. After you let it do an initial backup of your whole HD (which can take awhile), you wont have to think about it any more. Just make sure you either leave the backup drive connected or at least plug it in once in awhile.