You can do it either way, but I’ve more success and more compelling gameplay by first outline what it is exactly that can and cant be done and using that to craft the puzzles to my characters. Craft puzzles for the player. Not the player for the puzzle.
This also stops me from falling into the trap of my char magically gaining new powers simply to get past a certain level/puzzle