This famous idiom offers poor advice.
Before you ever ask for a favor, you’ll put yourself in much better position if you’ve already given to that person. When you ask for a favor under the predication that you’ll owe a favor in return, you are asking that person to trust your word that you will follow through.
It’s much better to routinely give without being asked. Give your time and energy freely and watch how the universe returns that giving back to you.