Pathfinder DMing tips
What praguepride said is extremely true. Listen to the players. They'll be their own worst nightmares making the game filled with their ideas. Plus, the suggested ideas will make the players think they are smart for figuring it out. ;) In the same vein, don't be afraid to make changes to make the game fun or challenging. But don't conflate 'fun' or 'challenging' as depriving them of a creative victory. If they beat a boss villain through a crazy idea, let them. (Reuse the boss reskinned later, don't sweat it).
As to challenging the characters, surprise them. Does the next room have zombies? Okay, but this batch explodes upon hitting 0 HP and deals xd6 fire damage or sprays out acid; setting an environmental hazard in a 15' radius for 1d3+1 rounds. Your orcs are under the control of a demon or demons? Incorporate it so the players can defeat them through traditional means, but at the cost of their weapons breaking, but if they use the environment they won't have to lose gear. Juju zombies are tough buggers. Orcs with a template can be unexpected.
Do NOT tell them "You're facing twenty orcs", instead, describe the orcs, and give them an estimated count. Unless they make a skill check, they should not automatically know what they are facing. Keeping the players guessing makes for challenges. The game is built on uncertainty. As the GM, dole out the information they should have access to, but don't give them more than that. In most of my games, there is less slaughter and more investigation, parley, and gaining allies. How you present scenarios will push the players to respond one way or another. For example, they burst into a room, and don't say "roll initiative", instead, have the creatures respond in some fashion. Unless the creature is attacking, allow for some sort of interaction. You'll be surprised by what the characters will do when the thing begs for mercy or yells at them for interrupting its meal/shower/sleep.
Instead of slaughtering everything quests - Give them the challenge to capture an enemy alive to obtain necessary information. You can always boost up HP, AC, saves, or add additional powers/resistances, but that should be a last resort.
If you don't want the characters to have a cakewalk, then you shouldn't give them access to gestalt, mythic, or other major boosts to their capabilities. Using advanced rules should be saved when you have mastered the basics. Allowing gestalt is an invitation to power gaming builds that deal more damage and have greater staying power. But use the opportunity to learn and see what works and what doesn't.
Last bit... It's not GM vs. Players/Characters. Collaboration is vital. You are there to help them tell a story, adjudicating the rules is a part of it. But this is a game where challenges matter, victory is sweet, defeat is bitter, consequences happen, and the story evolves.
Hope that helps.