When creating the levels, the goal was always making a new challenge that the player hadn't already seen. Each area introduces a new type of enemy, with its own mechanic, so every area usually focuses around this specific mechanic. The first thing when producing ideas for the levels is: "What can I do using this mechanic to make an interesting and fun challenge?".
I sketch out a few ways I can use the elements at my disposal to create the situation I want the player to face. Choosing the enemy type, placement, their speed, and the objectives of the level, I design a few variations, and then test them in-engine, to see which works better.
It's important to balance out a level which isn't too hard to figure out, but also not too obvious. I try to use the different elements to guide the player to that "A-ha!" moment, while also sometimes throwing a wrench in the way to keep it surprising and exciting.
It's also important to maintain an overall game flow, from level to level. The challenge needs to escalate, but also feel fresh and ever changing. I try to keep similar levels apart from each other, so that the player doesn't get tired of similar concepts.
There is also a progression on the use of an area's mechanics. The first level of an area introduces the player to the new enemy and its mechanic, and the subsequent ones use different situations in which the player learns how to fight or even take advantage of the enemy's mechanic. The player is slowly guided to mastering the game's mechanics through the levels themselves.