In 26:29 and 28:38 it is reported that Pharaoh declared himself the only god, and ordered others to worship only himself. The same thing is repeated in 79:24, where he declares himself to be the highest:
Pharaoh threatened, “If you take any other god besides me, I will certainly have you imprisoned.”26:29
Pharaoh declared, “O chiefs! I know of no other god for you but myself. So bake bricks out of clay for me, O Hamân, and build a high tower so I may look at the God of Moses, although I am sure he is a liar.”28:38
saying, “I am your lord, the most high!” 79:24
But 7:127 mentions many gods:
The chiefs of Pharaoh’s people protested, “Are you going to leave Moses and his people free to spread corruption in the land and abandon you and your gods?” He responded, “We will kill their sons and keep their women. We will completely dominate them.”7:127
How to reconcile these verses?
And also explain them, please, from the point of view of history, because the polytheism of the Egyptians and the fact that the Pharaohs were considered divine has long been proven. But I didn't read that Pharaoh was considered the only and highest god. Maybe there is such information?