Sumerians invented cuneiform; the Egyptians and Mesopotamians invented pictographs, and so on. These were the foundations of writing as we know it. Over time, different cultures develop different writing systems, which eventually lead to modern writing systems, having been enhanced over time.