Modern confetti has its roots in ancient civilizations and the act of throwing plant-based materials (i.e. seeds, nuts, twigs) to celebrate life, death, unions, or sacrificial offerings. The word 'confetti' hails from the Latin conficere meaning "to prepare or to make ready." This evolved to the French confit or confiture translating as preserved meats and fruits. After the colonization of the Americas these terms came to be more closely associated with preserving in sugar eventually evolving into 18th century Italian confetti (little sweets) or the English confectionary.
In 18th century France and Italy, Carnavale, an indulgent celebration before the start of Lent, confetti in the form of candied fruits and nuts were thrown. As sugar was a luxury item at the time, by the 1830s plaster of Paris replaced candied sweets. Written accounts and illustrations from the time show the need for masks also known as par a bonbons to protect the face especially during batailles de confetti, confetti battles.
Wearing masks to avoid the harm of thrown candied sweets and plaster evolved to non-harmful variations of confetti. In 1875 Italy, Enrico Mangili used the refuse of paper holes punched in paper to aid hatching silkworms to introduce the first variation of paper confetti. By 1892, plaster confetti was banned in Paris and in 1894 French poster artist Henri Toulouse-Lautrec was commissioned by London paper manufacturer J. E. Bella to advertise their "injury-free" paper confetti.
And here we are!
For a much better written history of confetti read this:
https://www.cabinetmagazine.org/issues/52/burnett.php