As a GM I've found that looking for the path of least resistance is important. It's important in life too, and in the same ways, but when running a game it can be very important. Life and people are - in some ways - very simple things. Efficiency is in many ways a desired trait, and we are all fundamentally lazy on some level. Not as a negative character trait, but in the sense that we will take the easiest path towards a goal. In other words, we - like water - naturally gravitate towards the path of least resistance.
Path of Least Resistance is why so many table top PCs become groups of murder hobos. When you can not only solve all your problems with violence, but solving your problem with violence is also the easiest way of achieving your goals, then why wouldn't you? This is further shown by most advice to curb Murder Hobo behavior is the simple process of increasing consequences to PCs who employ this solution at the wrong time. Or, in other words, increase resistance to the path of murder hoboing, and a different path will become the one solutions are more easily found on.
This is also why certain classes like Paladins have behavior conduct coded with mechanical consequences in them. There are thematic reasons for this as well, but ultimately the way to stop a Paladin from acting like the rest of the party and employing those direct, violence answers all the time is to increase the consequences. Which is part of the class. A Paladin can murder hobo with the best of them, but wanton murder for expediency's sake is a fast way to lose all your special mechanics and basically be relegated to being a second rate fighter.
Goals Determine Available Paths
When considering the path of least resistance you need to first know what the goals are. A single goal will often have a straight path to it - regardless of obstacles unless they're massive. Multiple goals are where you will get some variance in. The Paladin example for instance includes the secondary goal of "without losing my Paladin abilities" which thus changes the path the Paladin goes down because it's not enough to just achieve their primary goal, they need to achieve that second goal as well.
This is also why missions insisting a target be brought back alive are often more of a challenge than bringing someone back dead. You want the target dead, the gloves can come off and the whole province can be burned down. No reward unless you have a living - not resurrected - target at the end? That confines some of the more 'broad area' responses.
What Are The Characters Good At?
You have a hammer, everything starts to look like a nail. Why? Because hammers are really good at hitting nails, and not all that good at much else. By the same token, PCs are built to do certain things. Most players in my experience will specialize in an area. The group is thus greater than the sum of its parts because for every problem there is an expert. Games like D&D further encourage this with classes and "normal party" setup where people will actively say "We already have 2 front liners, so we need someone who can throw AOE ranged damage" or "we need buffs/debuffs/healing."
If you have a character who is really good at stealth, they're probably going to try to approach things stealthily. If you have a character who is really good at social, they're probably going to try to deceive/persuade/seduce their way through things (hence all the jokes about Bards and BBEGs.)
One thing to note with this, with so many RPGs primarily focused on combat, PCs as a group are almost always good at combat. Which means violence is always an answer. Also....
What Does The System Encourage?
People play games to have fun. Games are designed to have that fun involve the mechanics. So what does your game have mechanics or otherwise encourage people to do? I've lamented before that for all the talk about D&D 5e being built on "three pillars" of gameplay, the system only supports one of those: combat. And this can be a problem.
Consider you have PCs that want a thing. They're all really good at violence. And the system they're playing encourages violence as that is where the primary reward and engagement mechanic is. This is a formula for murder hoboing.
I'm lucky in that most of my groups also enjoy story telling and role playing. Our goals as players is to tell a story and role play, which means violence is not always the default answer. Even with those players though, it doesn't take a lot of social push back before people are indicating or flat out threatening violence even if just in the silent "you can do what we say, or we can fight about it and you'll die." of their mannerisms.
Encouraging Other Paths
So how do you break this? Well you need to encourage other paths. That means making other answers easier than whatever the PCs default answer is. The more social interaction is easier than combat, the more it will become the default path. The moment social becomes harder though, you'll very likely end up in a fight - and that can go both ways.
Remember, the key to this is not only having those paths available but also easier than the other solutions. That means the challenge involved is lower. This can be through overwhelming force, or any other solution you can think of.
But if you want the players to utilize a certain method you need to identify their goals, and then make achieving those goals easier along that path.
The other part of this is for your villains. Goals and Strengths are how villains are going to approach things. A Warlord will use their warriors and fighting skills. A mage will use magic. A politician will use politics. These are where they're strong, and how they've built themselves to achieve their goals. Like Joker says in the end of Dark Knight "Do you really think I'd bet everyone on a fist fight with you?" The same should be true for your villains that aren't primary combatants. Combat may happen, they should be prepared, but it is unlikely a wizard's "final bid" for their goals is "and then I win a fist fight with Throgar Punches-Through-Mountains."