Speaking of which, just to go on a bit about the whole history of the name YHWH.
The Name is first attested outside the Bible in Egyptian inscriptions from the time of Amenhotep III (1402–1363 BC) and Rameses II (1279–1213 BC) that speak of “the Shasu of Yhw” (Yahu). The Shasu were these clans of nomads who lived in the southern Transjordan; it is thought that some of these Shasu - there were different groups of Shasu, the ‘Shasu of Yhw’ being one of them - were the Midianites and Edomites, who could have been the ‘Shasu of Yhw’ referred to in this source.
Biblically, this makes sense, because the Edomites were related to the Israelites (Esau was Jacob’s brother), and the Midianites as well (Moses’ father in law - named Jethro, Reuel, or Hobab (who could also be Moses’ brother-in-law) - was the high priest of Midian, and a group of Midianites, the Kenites, joined the Israelites during the Exodus) Not to mention passages in the Old Testament that speak of Yhwh coming from the south, from the direction of Edom and the Sinai, where these peoples lived:
Yhwh came from Sinai,
and dawned from Seir upon us;
he shone forth from Mount Paran. (Deuteronomy 33:3)
Yhwh, when you went out from Seir,
when you marched from the region of Edom,
the earth trembled,
and the heavens poured,
the clouds indeed poured water.
The mountains quaked before Yhwh, the One of Sinai,
before Yhwh, the God of Israel. (Judges 3:4-5)
God came from Teman,
the Holy One from Mount Paran. (Habakkuk 3:3)
‘Seir’ is synonymous with Edom (Genesis 32:3; 33:14, 16; Deuteronomy 2:4, 22); interestingly in the Rameses II list, the “Shasu of Yhw” are mentioned in a context which also seems to mention Seir. ‘Teman’, meanwhile, is a region within Edom (Obadiah 1:8-9; Amos 1:12; Ezekiel 25:13), as well as the name of Esau’s grandson (Genesis 36:11; 1 Chronicles 1:36). ‘Mount Paran’ could either be a mountain in Edom or Midian or a synonym for Mount Sinai (which we actually don’t know the real location - could have been anywhere in the Sinai Peninsula or the Transjordan).
Add this information with the fact that the Name YHWH was not originally known in Canaan before the Yhwh-worshippers - the Israelites and related peoples - turn up in the record. While El and Elohim were already part of the religious terminology of Canaan (El being the highest god, the chief of the gods, the “creator of creatures”), YHWH wasn’t.
The biblical data is a bit confusing at this point: some passages seem to imply that the patriarchs who lived in Canaan did not yet know the Name either (Exodus 6:2-3: “As ‘El Shaddai’ I appeared to Abraham, Isaac, and Jacob, but by my name ‘YHWH’ I did not make myself known to them”) and knew God under the name ‘El’ (Genesis 14:18-20 - Melchizedek the priest of ‘El Elyon’ (Most High El); Genesis 16:13 ‘El Roi’ (El who sees); Genesis 17:1; 28:3; 35:11; 43:14; 48:3 - ‘El Shaddai’; Genesis 31:13 - ‘El (of) Bethel’; Genesis 33:20 - ‘El, the God of Israel’; Genesis 46:3 - “I am El, the God of your father …”), but there are other places which has God revealing the Name to them or them using the Name outright (e.g. Genesis 15:7-8 “I am Yhwh who brought you from Ur of the Chaldeans to give you this land to possess” - “O Lord Yhwh, how am I to know that I shall possess it?”)
You can either interpret this as further evidence for the books of the Torah/Pentateuch being made up of various originally-separate documents as the documentary (JEDP) hypothesis or the supplementary hypothesis claim it*, or explain Exodus 3:6 as not so much saying that the Name was literally unknown to Abraham, Isaac or Jacob but either as a rhetorical question (“As ‘El Shaddai’ I appeared to Abraham, Isaac, and Jacob - and did I not [also] make myself known to them by my name ‘YHWH’?”) or meaning that while they knew of the Name, they did not really fully grasp it or its full meaning (of God as One who is, as One who becomes whatever He wants to be and does whatever He wants to do, and as One who causes things to be).
*Tthe difference between the two being that the documentary hypothesis proposes that independent and complete narratives - the Yahwist (J), the Elohist (E), the Priestly (P), and the Deuteronomist (D) sources - were combined by redactors during the process of editing, while the supplementary hypothesis proposes that there was originally one work (the Deuteronomist source (D), comprising most of the book of Deuteronomy), onto which was added other material - the Yahwist-Elohist (JE - many scholars nowadays consider the Yahwist and Elohist to be the same material, since they’re rarely distinguishable) and the Priestly (P) sources - as time went on. Unlike the documentary theory, the supplementary theory doesn’t propose J(E) and P as independent accounts but simple additions, reformulations and corrections to D.
Assuming that the Name was not passed down to the Hebrews in Egypt (in other words, knowledge about it was lost), one possible avenue for Moses to learn about it for the first time would be the Yahu-worshipping Midianites/Kenites he stayed with. Of course, this in no way detracts from the new understanding Moses gained during his encounter with God and His Name at the burning bush: who knows, maybe that was when he finally pieced two and two together. God has many ways of revealing Himself to His people; could not the Kenites have had a part to play in God’s revelation of Himself to Moses and the Hebrews?