The word pizza was first recorded in AD 997 in a Latin manuscript from Gaeta, an Italian town in Lazio.
The reference appears in the Codex diplomaticus Caietanus, a notarial document associated with Gaeta. It records an obligation to provide the bishop with twelve pizzas, along with a pork shoulder and kidney, on Christmas Day, and another twelve pizzas with chickens at Easter. The entry shows that the word was in use centuries before the modern Neapolitan pizza emerged.
This does not mean Gaeta invented modern pizza, or that the 997 food looked like today’s tomato-and-mozzarella pie. The document records the word and a food payment, but gives little detail about the preparation. Modern pizza developed much later, especially in Naples during the eighteenth and nineteenth centuries.
Naples is therefore strongly associated with modern pizza history, while Gaeta is the answer to the narrower question about the earliest recorded use of the word. Genoa and Palermo have important Italian food traditions, but they are not the town named in this manuscript.