In Galatians, Paul was arguing against a legalistic heresy. The answer, of course, is that they received the Holy Spirit by faith, not by the law. Paul is quoting Genesis 15. If we have faith, we are children of Abraham. We inherit the promises that God gave to him.
Faith brings blessings.
But if we rely on keeping the law, we will be condemned. We will fall short. But Christ saved us from that. He died for us. Then, in verses 15-16, Paul uses a practical example to tell the Christians at Galatia that the law of Moses cannot do away with the promises given to Abraham.