Chee-Chiew Lee gives us a closely argued, balanced and careful treatment of the relation between justification and the Spirit in his The Blessing of Abraham, the Spirit, and Justification in Galatians: Their Relationship and Significance for Understanding Paul’s Theology. There’s a great deal to learn and admire in his dogged attention to detail. By tracing the blessing of Abraham through Genesis, the Pentateuch, and the Prophets, he discovers the sources for Paul’s parallel (equation?) of the Spirit with the blessing to Abraham in Galatians 3:14.
But there’s a shortcut that Lee misses. He works through the direct reiterations of the promise to Abraham in Genesis, but never pays attention to the Joseph story. If you’re looking for “blessing to the nations” in Genesis, it’s a huge oversight to ignore Joseph, who is the seed of Abraham who blesses the nations. And he does so under the inspiration of the “Spirit of Elohim” (Genesis 41:38; whatever Pharaoh means by the phrase, in Genesis it refers to the Spirit of Elohim who hovers over the waters in Genesis 1:2).
There you have the kernel of Paul’s discussion in Galatians 3: Abraham’s seed, the blessing of Abraham to the nations, the Spirit of God. And you don’t even have to leave Genesis to find it.