They believed their writing was gifted to them by the Gods. According to them they were not the first, they were just the next in line after the Gods.
Sure. They had a creation mythos like everyone else. What they didn't have is evidence of a real precursor civilization to ground those myths. The classical Greeks could see Mycenaean ruins.
Not as many as later civilizations but there are buildings that likely pre-date the Sumerian civilization like the desert kites. And in Syria and Turkey there are megaliths and ruins which are older than Sumer which builders the Sumerians might have know of from oral history.
> The classical Greeks could see Mycenaean ruins.
Apparently, they Minoans had plumbing in the 1800s BC, so I'm sure the Greeks would have been surprised at what had preceded them by a long time.
> They believed their writing was gifted to them by the Gods.
This is an essentially universal belief in the past, and not just about writing. People are able to notice that their lifestyle depends on technologies, and that the only way to learn those technologies is for someone else to teach you. So they decide that the technologies on which their lives depend - pressing olives, farming grain, writing, harvesting wool*... - were taught to their ancestors by the gods.
In the case of writing specifically, the ancient Greeks attributed it to Cadmus, who was not personally a god. But (1) he was a hero with descent from Poseidon, (2) Greek heroes receive prayers and sacrifices and grant supernatural blessings just the same way gods do, and (3) they credited him with introducing writing from Phoenicia, not inventing it out of whole cloth.
* In early records, sheep are not yet sheared - they're plucked. The sheep we have today aren't the sheep they had then.