Our alphabet, called the Roman alphabet, was based on the older Greek alphabet.
In Greek, the letter z is the sixth letter. But when the Romans borrowed the Greek letters to form their own alphabet, they didn’t need the z, because they didn’t have a z sound in their language.
Later, many Greek words came into use in the Latin language. So the Romans brought back the z in order to write Greek words, and put the z at the end of their alphabet.
The oldest letter in our alphabet is o, which has existed in its present form for more than 3,000 years!