@Babaryka Well, I wrote a small addition to it myself so I guess you can say I studied it, lol.
If you want a general idea of how it works, basically, it goes through games that already were server analyzed and then tries to start a puzzle at points where the server analysis identified a mistake. Often, that means there now is a tactic available to the opponent. So it then checks if it's actually winning (going from very losing to slightly losing will still be marked as a mistake after all but doesn't make for a great puzzle) and if there's a row of moves where there's always only a single clearly winning move for the player. The details are a bit more complex since it checks for a bunch of other details to try to exclude bad puzzles but that's the gist of it.
@DEunddieWELT While it's true that there exist a very small number of puzzles where this is the case (when (potentially older versions of) Stockfish don't find the other move on medium depth), it's extremely rare and they get removed when discovered. If this happens to you that often it's more likely the second way you find is just not correct because of some response you missed. That's why you should always check with Stockfish when you think the puzzle is wrong. If you actually find a bad puzzle, you can report them here. But given the ratio of actual bad puzzles to incorrect reports and your (sorry to say) rather low puzzle rating, I'm inclined to believe that's not really the case.