Do we know what is the earliest known piece of polyphonic music?
I know that there are some 12-th century composers like Léonin and Pérotin that did this kind of thing, but did they compose the earliest known piece of polyphonic music?
Léonin and Pérotin were two of the most well-known and advanced composers of early polyphonic music, but they certainly were not the first. It's difficult to say when polyphonic music first emerged because it's origin predates standardized music notation, but its origins are at least a few hundred years before Léonin and Pérotin.
A piece was actually just recently discovered from around the year 900, and is now believed to be the oldest known example of a notated piece of polyphonic music. The piece was discovered in London by a student from St. John's College, Cambridge. The link below provides more information as well as a video of the piece being sung:
That said, there are treatises from around the same time (see Musica enchiriadis, Scolica enchiriadis) that indicate that by around the year 900, multiple people were already experimenting with polyphonic music, so it's likely that there are other polyphonic manuscripts from around the same time waiting to be discovered.