When I learn something without a plan for when and how I'll review it later, I often feel that I may as well have never learned that thing, because I'll probably forget it before I get to benefit from knowing it. Flashcards are a skill that give you the confidence that you can learn anything, without wasting your efforts.
I keep mine in this Github repo. My enthusiasm for studying ebbs and flows, as it does with everything in my life, but these are particularly helpful when I'm learning a lot of new things in a short period of time.
One of the temptations of flashcards, especially when you're new to the habit, is to add everything into your system. After all, as Michael Nielsen astutely points out, "the average card only demands 4-7 minutes of total review time over 20 years... So if a fact seems worth taking 10 minutes to memorize, just do it". This is shortly followed by the most common failure mode - being overwhelmed by a mountain of reviews every day, and then falling off the wagon.
In my experience, I don't need to make every fact I want to remember into a flashcard in order to remember it. I think that most of the information that I've learned is still in my head somewhere, lying dormant, and that most often "forgetting" those facts is really just forgetting how to access it. If I can remember some adjacent fact then suddenly that lost fact becomes available to me again and become easier to think of in the future.
So my flashcard philosophy isn't to record literally everything I learn; it's to memorize a collection of mental footholds. Anecdotally, it's working pretty well.
The hardest guidelines to learn are how long a good card should be and how many of them to add: it's shorter than you think, and fewer than you want. One technique I've found helpful is to delay adding the cards to my system until after there's been a "cooling off" period. Typically I'll leave flashcard ideas in the margins of a book I'm reading and then flashcardify that book after I'm done reading it.