Typically when I design puzzles I do the latter, coming up with a concept and then designing the level around that (though sometimes the concept is in fact just a short, key sequence of moves). For this game though, since I made it really quickly, I mostly just sketched something that seemed interesting in the level editor and tried solving it, and if it seemed okay then I removed extraneous space (often several times, after finding better and better solutions) and threw it into the game.
I don't actually recommend designing a puzzle game in this way, since it led to most of the levels not having any sort of intended logical key to them and they come off to me as a bit unfocused and bland as a result. I've seen multiple people solve puzzles somewhat accidentally and be like "wait how did I do that, I don't know why that worked," which isn't exactly the kind of experience I was aiming for. It seems like that may have contributed to some of this game's bizarre charm for some folks, though.
The only two levels I designed with a logical path in mind were the tutorial and #1.