There's a few mechanics in-game that can help you jot down your findings during a puzzle, most significantly the peg markings and the bug holograms -- these are mainly talked about in the 2- and 3-peg tutorials!
There's also "unconventional", yet super effective ways of using these mechanics which the tutorials don't tell you. The peg markings for example can help a lot with figuring the colors out, and therefore can save a ton of the headaches!
In either case, don't beat yourself up about it too much, as it does take some time to get used to the puzzles! 5-pegs for me took more than an hour the first times I've played them, but got it down to about 10 minutes total eventually. Even with that in mind however, try to keep away from the game if you're feeling tired -- the harder ones can easily become psychological torture sometimes!!