Both are correct.
In most cases, when using the expression, “the LORD” [“Yahweh” in the Hebrew, basically meaning “The Eternal” or “The Everliving One”], the Old Testament refers to the One Who later became known as the Son, Jesus Christ. There are statements, however, which use the expression “Yahweh” for the One Who later became known as “the Father.” This also proves that both the Father and Jesus Christ have always been God beings, and that the Old Testament teaches that there is more than just one God being.
Notice Jeremiah 23:5-6, which uses the term “Yahweh” for both God beings in the same context:
“‘Behold, the days are coming,’ says the LORD [Yahweh], ‘That I will raise to David a Branch of righteousness; A King shall reign and prosper, And execute judgment and righteousness in the earth. In His days Judah will be saved, And Israel will dwell safely; Now this is His name by which He will be called: THE LORD [Yahweh] OUR RIGHTEOUSNESS.'”
We see, then, that the LORD (Yahweh) will raise a “Branch of righteousness,” to be also called the “LORD” (Yahweh). It is the Father who raises Jesus Christ. Both are called here LORD or Yahweh.
We find a similar statement in Zechariah 4:8-9. We are quoting from the New King James Bible, as it conveys the intended meaning more clearly:
“Moreover the word of the LORD [Yahweh] came to me, saying: ‘The hands of Zerubbabel Have laid the foundation of this temple; His hands shall also finish it. Then you will know That the LORD [Yahweh] of hosts has sent Me [i.e., Yahweh] to you.'”
We see, here, that the LORD [Yahweh, i.e. Christ] speaks to Zechariah and tells him that He [Christ] was sent by the LORD [Yahweh, i.e., the Father]. In other words, the LORD sends the LORD. The expression “Yahweh” applies to both God beings.
This is not a reference to a human messenger or an angel, conveying the “word of the LORD,” while the LORD is speaking about Himself. Notice that the New King James Bible capitalizes the word “Me” in “…the LORD of hosts has sent Me to you.” They convey the intended meaning that the word “Me” refers to one of the two God beings, and not to a human or angelic messenger.
You may also want to check, for further proof, Zechariah 6:12-15, in the New King James Bible. In that passage, the LORD (Yahweh, i.e. the Father) speaks about the LORD (Yahweh, i.e., Jesus Christ), the “MAN whose name is the BRANCH.”
It is true that in most cases, the expression LORD or Yahweh is used for Jesus Christ. Notice, for instance, Hebrews 1:10-12. In that passage, God the Father (vv. 1, 5) says to the Son, Jesus Christ (v. 10): “‘You, LORD, in the beginning laid the foundation of the earth…'” This is a quote from Psalm 102:12-15, speaking about Yahweh. Paul, in the Book of Hebrews, applies this Psalm, and the term LORD or Yahweh, to Jesus Christ.
There are a few statements in the Old Testament, however, which use the expression LORD or Yahweh to describe God the Father. For further evidence, notice Micah 5:2-4, referring to the Father, when using the term, LORD or Yahweh. Notice, too, Psalms 2:2, 7, 11, likewise referring to the Father as the LORD (Yahweh), and to Christ as “His Anointed,” or “My Son.” Finally, notice Psalm 110:1, which is quoted by Christ in Matthew 22:42-45, which also refers to the Father as the “LORD” (Yahweh), while referring to Christ as “Lord” (“adon” in the Hebrew, meaning “Lord, sir, master.”).