Bootloader does not recognize current kernel

the bootloader doesnt recognize any kernel but 5.18

So, my guess, something happened to f2fs filesystem and grub fails updating.

Try running fsck.f2fs on root partition. Also check: F2FS - ArchWiki

Another thing you can do and post here is enable debug messages in GRUB before running update-grub: GRUB - ArchWiki

What I recommended in my instructions is manually adding an entry. The same thing your doing by editing grub during boot.

output

        Error: Failed to get the device stat!

I was trying to get the section added so that on the next update to the kernel it would be automatically added. But if your having problems where grub is not updating you could add the edited section to directly to /boot/grub/grub.cfg in the ### BEGIN /etc/grub.d/40_custom ### section. The problem with that is if the kernel and grub is upgraded the section you add will be gone. You will have to save that edited section to a file and manually copy it in after every kernel/grub update. Its not a solution, more of a work around.