The idea that Egyptian tombs are cursed as a means of protection is largely a 20th century creation.
Egyptians began mummifying their dead around 3500 BCE. In all the years of archaeological explorations of Egyptian tombs very few written or inscribed “curses” have ever been found. Those that have however could be thought of as early security systems – trying to protect the contents of the tomb from grave robbers (both amateur and archaeological). Unfortunately, given centuries of rampant looting of Egyptian graves it’s safe to say the curses didn’t work. Despite so few curses having ever been found our modern pop culture is firmly gripped by the undead idea of cursed tombs with mummified Egyptians exacting their revenge from beyond the grave.
The primary reason we think of cursed Egyptian tombs is the 1922 excavation of the tomb of Tutankhamun. George Herbert, 5th Earl of Carnarvon, had financed the search for King Tut’s tomb which was run by archaeologist Howard Carter. As Tutankhamun’s tomb was discovered, and the magnitude of the discovery was realized, the Egyptian government ensured that all artifacts would stay in Egypt. Without being able to sell any of the treasures (to cover his costs … or to make a profit) Lord Carnavon sold the exclusive rights to the excavation story to the London Times for £5,000 up front as well as 75% of the Times’ profits from sales of the story to other papers. This left every other news outlet high & dry for a story. Enter: the mummy’s curse.
Without access to the largest archaeological find of the age, all other news organizations were left scrambling for another angle. Less than six months after the discovery, on April 5th 1923 Lord Carnarvon died and the press had their angle. The media began to report on a supposed Egyptian curse that had killed Carnarvon for opening King Tut’s tomb (despite no such curse being written anywhere in the tomb).
Paranormal “experts” crawled out of the woodwork to substantiate the idea of a curse. Archaeologists (especially the ones who were excluded from the tomb) where willing to discuss potential curses, which allowed them to profit from the find. Rumors and claims spread & grew like wildfire. Even Howard Carter let the reports of a curse continue, never publicly denying them, because (like a Scooby-Doo episode) it had the effect of scaring people away from the tomb, allowing him to continue working on the excavation for the next decade in relative peace.
I want my mummy
The western fascination with Egypt, and the orientalized ideas that it was an exotic land of magic, has existed since at least the Middle Ages. Using ground up mummies as medicine, or turning them into paint pigment, had long been practiced by Europeans. The 19th century Egyptomania craze popularized Egypt as a setting for fantastical stories of mummies and tombs. The first story featuring a reanimated mummy (a trope most later mummy stories would follow) was 1827’s The Mummy! A Tale of the Twenty-Second Century by Jane Webb. Bram Stoker’s 1903 horror novel The Jewel of Seven Stars also features Egyptian magic and resurrection. However the discover of King Tut’s tomb did more to popularize the idea of a mummy’s curse than anything else.
In 1932, not long after the 1922 discovery of King Tut’s tomb, the film The Mummy was released featuring Boris Karloff as an ancient mummy resurrected. This was the beginning of many, many mummy movies (including 1944’s The Mummy’s Curse and 1957’s Pharaoh’s Curse, both of which have a curse right in the title). Each telling of a mummy story wanted to be better or more fantastical than the previous so the idea of a mummy’s curse grew. Today the idea of resurrected mummies & curses is a standard part of the horror genre.
Added info: As for any idea that Lord Carnarvon’s death might be attributed to some kind of curse, there is no evidence to support this. While a few people associated with the excavation of the tomb of Tutankhamun died not long after its discovery, nobody died at an unusually young age. An epidemiological study of the people who entered the tomb found that these individuals died on average around 70 years old, which was normal for the early 20th century.
Also, Lord Carnarvon’s home was Highclere Castle, which today is the setting of Downton Abbey.