It doesn't matter, just follow your feelings. Anything you continue doing under mental duress is bad for you. If that means resigning every puzzle after 10 seconds then puzzling is not for you - perhaps chess is not for you. It's supposed to be fun! However, do look up the solution and try to understand why you couldn't find it.
Also note that the number of chess puzzles is virtually unlimited. There is nothing you need to learn from one particular puzzle, today. Opportunities to get it will return, possibly at a moment you are better prepared for it.
If you are trying to solve a puzzle but don't think that you have found the right answer, and what point is it a better use of your time to move onto the next puzzle? Either by playing the best move you found or by choosing a different puzzle.