StoneyB's answer is correct - to lie has the meaning of being situated or located.
My answer below addresses your guess on substituting depends on how, and how that affects the meaning of a sentence.
Your guess is largely correct, in that substituting depends on how for lies in the way usually gives the same sense, however there are some subtleties that this substitution misses.
This is because of the location sense that comes from lies in the way - that location of the cause is quite concrete.
A good place to start is your two example sentences:
The compatibility of a couple and the quality of a relationship lies
in the way they handle their arguments and differences.
Here you can substitute depends on how quite naturally.
I suppose the effectiveness of convert advertisements lies in the way
our society is wired.
Here the substitution does not work so well. The reason is that "the effectiveness of convert advertisements" is a definite subject, and "lies in the way" gives a definite cause. Whereas "depends on how" is indefinite.
The sentence is stating that convert advertisements are effective, because of how our society is wired. Using "depends on how" here would imply that there are many different sorts of convert advertisements, or many different ways in which our society is wired.
By changing the indefinite "a couple" to a definite couple "Jack and Jill" we can see the same effect:
The compatibility of Jack and Jill lies in the way they handle their
arguments and differences.
Here this means something like: Jack and Jill are compatible, because of how they handle their arguments and differences.
The compatibility of Jack and Jill depends on how they handle their
arguments and differences.
Now it implies that Jack and Jill are more or less compatible over time, because of how they handle their differences.
Interjections like what the X and what on X are expressions of surprise or confusion, frustration or anger, resignation or nonchalance. The intensity more or less correlates to that of the key word.
As for the character in the video, I would paraphrase his thought as either:
I don't understand! Why do I need to give all this information?!
=Confusion.
or
I'm being asked to do too much!
=Anger.
His face suggests anger, but the context and the narrator's next comment address his confusion. Notice, by the way, that the narrator softens the "WTF" in a very predictable way:
You're probably wondering what the heck I'm talking about.
There are lots of ways to soften such expressions. Actually, WTF, although not easy to use in spoken conversation or likely to be understood by older speakers, is already softer than spelling it out.
Here are some more variations — a small selection of the many available.
→ What the heck? Didn't I lock that cow in her pen?
=Surprise. Quite tame.
→ What the hell, Richard! I thought I told you to stay out of this!
=Anger, indignation.
→ What the devil? Why, that's my briefcase in the hands of a street urchin! Catch him!
=Confusion and panic. Older British language.
→ What in the Sam Hill is that big shape on the horizon?
=Confusion. Certain US states.
→ What the hey! I guess it doesn't matter whether we hold the party on Saturday or Sunday.
=Nonchalance. Older US usage, very tame.
→ What on God's green earth are these lawyers asking us to do?
=Bewilderment.
→ What the f---! They scheduled three exams on Monday? FML.
=Anger, bewilderment.
One of my favourites, actually, is to simply omit the X altogether. The stress then falls on "what".
What the! Scaramucci is already out?
Best Answer
In the context you've described people use that phrase to mean: After finishing these steps you can now use the item or product or whatever it may be.
An example for programming might be explaining all the steps to get your IDE installed and configured and then saying "and now we're/your on our/your way." Meaning now you can use it and move on to writing code.