That said, as you go back there is a lot less writing. Less writing happened and less survived.
The Hamurabbi code from 1754 BC is amazing partly because it's an island. A longish piece of text when all we have from the periods around it is lists of names and other short texts. Reading the Hamurabbi code (or the best translation we can get) really lets you feel like these people were real.
Still, there's a huge difference between that and something like Plato or Sun Tzu 100 years later. They were literate in a way we would recognize as literate and they could explain themselves through text, writing to convince other literate people like us, like we are doing write now on These guys really do exist through their works. You can form a mental model of how they think.
There are much finer examples of ancient literature, surviving versions of the Epic of Gilgamesh can be as old as the Code of Hammurabi, some Old Babylonian tablets from 1800 BCE survive though the version Sîn-lēqi-unninni compiled in Akkadian is a relative latecomer at 1200 BCE.
While I have only read it in translations, I find that it deals with concepts of personal death, friendship, loss, jealousy, love and sexuality in ways that are remarkably erudite and sophisticated.
And if legal codes and injunctions are your thing "The Instructions of Shuruppak" or "The Maxims of Ptahhotep" are probably 700-900 years older than The Code of Hammurabi.
And the saddest truth about the really ancient writings: most are still unread, remaining in some closed vaults, or are being often actively destroyed!
Specifically: clay tablets written in cuneiform aren't easy to read: experts are needed, and we have much less experts than the material. So there is a lot of stuff in the vaults of the big museums never read. One of the big problems is matching the texts: when you have unsorted tablets it's like having only the single pages from many books without the page numbers. There is a story somewhere but it's hard to reconstruct.
I enjoy these texts from our deep past, and I wish we had more of them. They show that our ancestors wrestled with many of the issues we contend with today. Thanks to several thousand years of prior work, we may have a bigger toolbox of solutions than they did.