In games and movies it's a fairly popular theme that the characters discover the remains of a lost advanced civilization. In those cases, it's usually rather extreme where people with swords find advanced electronics or something, but I was wondering if there are any real-world cases of more advanced civilizations dying out for one reason or another and taking their secrets with them (if only for a century or two)?
The closest example to your scenario that I'm aware of would be in Ancient Crete. The Mycenaean culture was able to read and write, using a form of writing known as Linear B. That civilization died out in the 12th or 11th century BCE and was eventually replaced by Dorian Greeks, who migrated south from the mainland in the ensuing centuries - the so-called Dorian Invasion. Dorians were illiterate in the beginning, and only redeveloped writing some time later, around the time of Homer in the 8th century BCE. The intermediate period is known as the "Greek Dark Ages", during which they lost and only later regained the ability to write.
It should be noted that the new form of writing was not the same as Linear B. It took millennia, literally, before Linear B was deciphered (over the course of the first half of the 20th century).
Whether the Dorians thought of the Mycenaeans as an advanced culture or not, I could not say.