Pharaoh is a title given to Egyptian rulers in the New Kingdom (not before).
For centuries it was thought that all Egyptian rulers were referred to as Pharaohs. Actually the Christian Bible insists that Abraham and Joseph interacted with Pharaohs. However modern discoveries show that this cannot be true. Pharaoh is a title given to rulers in the Egyptian New Kingdom, not before.
Before the New Kingdom the word “Pharaoh” meant “Great House” and it referred to the buildings of the court or palace but not to the ruler.
From the Twelfth Dynasty onward, the word appears in a wish formula “Great House, May it Live, Prosper, and be in Health”, but again only with reference to the royal palace and not the person.
Sometime during the era of the New Kingdom, Second Intermediate Period, pharaoh became the form of address for a person who was king.
So there were no Pharaohs at the time of Abraham or Joseph. They were just kings. But the Quran didn’t do this mistake. The Quran correctly addressed the ruler at the time of Joseph as King, and correctly addressed the ruler at the time of Moses as Pharaoh.
The Egyptian ruler at time of Joseph was a king:
[Quran 12:52] The king said, “Bring him to me, and I will reserve him for myself.” And when he spoke to him, he said, “This day you are with us established and secure.”
The Egyptian ruler at time of Moses was a Pharaoh:
[Quran 40:26] Pharaoh said, “Let me kill Moses, and let him appeal to his Lord. I fear he may change your religion, or spread disorder in the land.”