Very simple challenges have simple solutions, such as the fly spell to the chasm. To make challenges more interesting, less trivial, you should add layers, alternatives, or obfuscation. In short: There should not be own clear and simple objective. Some ways that this can be done are detailed in the following.
Competing interests / opportunity costs
Making it so that you cannot have your cake and eat it too makes anything more interesting. Socially, this happens usually because helping one faction steps on another faction’s feet, so you need to choose. In exploration you can have something similar by giving multiple objectives which cannot all be met because of time constraints or otherwise (e.g. any objective will make you consume an object that is needed for every one). One example of this is how Batman needs to choose between Rachel and Harvey in The Dark Knight. Obviously, this does not need to be an urban environment. I once ran a game (my own system, not 5e, but this is applicable to 5e) where the party had to chase someone and there were two possible ways. Giving multiple valid ways makes this a lot more interesting, so long as the players have some information about the dangers of each.
Giving agency to the opposition (objectives)
There is no reason you cannot give objectives to the environment, e.g. to the wind over the chasm or the river below. This can swap somewhat into combat or social. But so long as you cannot persuade the wind or deal damage to it, it is still exploration. You can also mix the pillars when you can persuade the wind or you throw in some goblin archers.
Challenges get more interesting if you can’t know for sure what will happen. If you present the players with a heavy stone gate and an obscure contraption, you obfuscated things. Nobody knows, if the contraption can be used to open the gate or if it will do something nasty if one tries to blow the gate. The encounter will probably be interesting at first, even if in the end it can be resolved with a single spell. Just because the players don’t know that. You could even add an obscure contraption to your chasm.
This is how I run traps. I make sure that the players know something is off, but they need to find out what it is and how to circumvent it.
Scaling for level
Opportunity costs work at every level, so long as the tools available at that level don’t allow the characters somehow to eat the cake and have it. Obfuscation equally works at every level.
Otherwise you need to choose your challenges with the character’s tools in mind. It is nice if the players can use their shiny toys from time to time, such as fly on a simple chasm. But otherwise, you should either make challenges with an added complication or which cannot be one-spelled with the available spells.
Take the toys away from time to time
By adding a complication such as an antimagic field, you can remove the most obvious solution to a problem. You should not do this too often, however, because your players chose the spells and what to use them. Imagine you bought a lawn mower but aren’t allowed to use it in front of your house. You can also make it so, that the complication can be removed, adding just another layer to the challenge.
Specific solutions for specific spells
If you know a specific spell that will invalidate your challenge, you can add a countermeasure that will need to be dealt with.
Fly: Make it a small passage with an entangling plant. Now you have to things for your players to think about.
Locate object: This can only find a specific object you have seen before. Or a type of object. Imagine your players are looking for the legendary dagger of xyz. Too bad the users of the ancient temple had a whole collection of daggers lying around everywhere for locate object to detect.