In the books of Moses, it always refers to the king of Egypt of Pharaoh and never says what is the actual name of the king. Why doesn’t the Torah mention any of the names of the Pharaoh?

Pharaoh originally did not refer to a person, but to the governmental palace. It means “great house”. However, starting in the New Kingdom, the term Pharaoh started to be identified with the Egyptian king.

pharaoh, (from Egyptian per ʿaa, “great house”), originally, the royal palace in ancient Egypt. The word came to be used metonymically for the Egyptian king under the New Kingdom (starting in the 18th dynasty, 1539–1292 bce),

“The early monarchs of Egypt were not known as pharaohs but as kings. The honorific title of `pharaoh’ for a ruler did not appear until the period known as the New Kingdom (c.1570-c.1069 BCE).”

“Although the term pharaoh was used to refer to the king, the first recorded instance of this connection is in the reign of Thuthmosis III (dynasty eighteen).”

“The word pharaoh originates from the Egyptian term “per-aa,” which means “the Great House,” Leprohon wrote. The term was first incorporated into a royal title during the rule of Thutmose III (reign circa. 1479 to 1425 B.C.), Leprohon wrote.” … ation.html

“Sometime during the era of the New Kingdom, pharaoh became the form of address for a person who was king. The earliest confirmed instance where pr ꜥꜣ is used specifically to address the ruler is in a letter to Akhenaten (reigned c. 1353–1336 BCE) that is addressed to “Great House, L, W, H, the Lord”.[8][9] However, there is a possibility that the title pr ꜥꜣ was applied to Thutmose III (c. 1479–1425 BCE), depending on whether an inscription on the Temple of Armant can be confirmed to refer to that king. During the Eighteenth dynasty (sixteenth to fourteenth centuries BCE) the title pharaoh was employed as a reverential designation of the ruler.”

It was not uncommon in the early 18th Dynasty to only refer to the kings as Pharaoh. It was only later, in the 22nd Dynasty, personal names were used along with the title Pharaoh.

“About the late Twenty-first Dynasty (tenth century BCE), however, instead of being used alone as before, it began to be added to the other titles before the ruler’s name, and from the Twenty-Fifth Dynasty (eighth to seventh centuries BCE) it was, at least in ordinary usage, the only epithet prefixed to the royal appellative.[11]”

“The early kings are always mentioned under the general title Pharao, or Pharao the King of Egypt; but personal names begin to appear with the twenty-second dynasty, though the older designation is still used, especially when contemporary rulers are spoken of. The absence of proper names in the first books of the Bible is no indication of the late date of their composition and of writer’s vague knowledge of Egyptian history, rather the contrary. The same is true of the use of the title Pharao for kings earlier than the eighteenth dynasty, which is quite in keeping with Egyptian usage at the time of the nineteenth dynasty.”

“As noted by the late Jaroslav Černý, the term “Pharaoh” first appears without the name of the king in early biblical usage, and only later (from 950 B.C.) does it appear combined with the actual name of individual kings of Egypt, as for the names of Pharaohs Shishak I, Hophra, and Necho.” … Smith-3106

This fits with the Biblical usage of the term Pharaoh since in the Torah, the title is used by itself, without the name of the king. However, in later books, the name of the king is used.

Shoshenq I
943–922 BC

2Chr 12:5
Shemaiah the prophet visited Rehoboam and the leaders of Judah who were assembled in Jerusalem because of Shishak. He said to them, “This is what the Lord says: ‘You have rejected me, so I have rejected you and will hand you over to Shishak.’”

690–664 BC

Isa 37:9
The king heard that King Tirhakah of Ethiopia was marching out to fight him. He again sent messengers to Hezekiah, ordering them:

Necho II
610–595 BC

2Kgs 23:29
In his days Pharaoh Necho king of Egypt went up against the king of Assyria to the river Euphrates: and king Josiah went against him; and he slew him at Megiddo, when he had seen him.

Whoever wrote the Torah seemed to have intimate knowledge that during the 18th Dynasty, it was acceptable to use the title Pharaoh for the king and to also not use the name of the king. If the Torah was written during the Babylonian captivity, how would they have known this and incorporated a style that was only applicable during that time?