On apple's website, MacOS 12.5.1 is shipped with XNU kernel 8020.140.41
But from uname -a
I got root:xnu-8020.240.7~1
Darwin devnull 21.6.0 Darwin Kernel Version 21.6.0: xxxx; root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64 i386 xxx Darwin
So the kernel version differs from the website, did I miss anything?
The open source code release is for macOS 12.5, whereas you're looking at 12.5.1, which is a revision release with security patches. Apple typically doesn't offer source code for such revisions, unfortunately.