Quoted By:
Technically, Mew was discovered before Mewtwo, just not announced to the public.
But in any case, there's no consistent lore about how the indexing works. They do cover the nidoran thing in the gen 2 zukan by saying that even in universe there's different criteria between different people, which was nice.
But then you have Juniper saying Victini was given the number 0, meaning that the order exists even outside the player's influence. And Silvally is discovered literally during SM's plotline but its before many mons that were found out later.
If you like the idea that Mewtwo comes before Mew because Red found it first then I guess its good enough, but there's no strict lore.