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.
The first gen will anyways be best for me. Nothing else since had captured the magic I felt for that game with the exception of gen 2. Going through all of Johto and beating the game and then end up back in Kanto and beating that one too. That was truly special.