For me it’s definitely gen 4 (heartgold and platinum are just. top tier), but gen 5 is really close. Really polished and challenging games all around
I also think gen 7 is pretty underrated, especially USUM which got a bit of hate for being too similar to Sun and Moon. Which is kinda true…but I think the end result was pretty good all things considered.
I’ve lost track of gen numbers, I’m old, been playing since red/blue, but original gold/silver will always be the peak for me. Besides that I did especially love the rolling nostalgia wave of fan service in the Alola games, thought they were pretty fun but way too easy.