Save your work every 5 minutes - a habit that saved me from disaster
When I was starting out, I lost an entire afternoon of coding because I forgot to save. It was heartbreaking and made me late for my matatu. Now I save after every small change I make. You can use Ctrl+S which is just pressing the S key while holding down the Ctrl button on your keyboard. Some programs even have an auto-save feature that saves for you automatically every few minutes. The lesson is simple: treat your work like your phone battery - save it before it dies. When you're just starting out, your brain is full of new things to remember, so don't make saving an extra thing to worry about. Just do it often and you'll never lose your progress again.