I think it was Pie as it was dropped going to 10. Oreo was 8. They still use the names internally as Android 16 is Baklava.
You can technically say Samsung did it first with the S series on the mobile side, but the point is that with annual releases, aligning to the year makes more sense.