Why is nginx newer than nginx-mainline?

nginx - ArchWiki says:

Install the package nginx-mainline (mainline branch: new features, updates, bugfixes) or nginx (stable branch: major bugfixes only).

But if I see their versions, mainline is 1.21.6-1 (last update 9th Feb) and nginx is 1.22.0-2 (last update 10th June). Why is the “stable” version newer? Is the Wiki wrong, or are the names of the packages wrong?

Because they are 2 different packages in 2 different repositories built on 2 different dates…albeit by the same package maintainer. I’m guessing if you want to know more, you have to contact the maintainer himself.