>>45941838XY and Sword & Shield are the best games in the series. Both actually upgraded the gameplay in significant ways. X&Y made several really good balance tweaks to the overall engine (nerfing Drizzle and Drought was an A+ idea), and mega evolution was a pretty great subsystem for a lot of reasons. The latter gave us a huge abundance of QoL features to the point where you can make any mon competitively viable, the best super mechanic in the series, and a huge number of gameplay changes that added up to the most polished competitive gameplay we've seen yet (e.g. Dynamax adding a ton of depth, Heavy Duty boots is a great new item, the new tutor moves are perfect, the removal of cancer like Pursuit and HP is something I'm eternally grateful for, Pursuit in particular was an absolute blight on the game making Psychic types next to useless). I know a lot of people still can't get over not being able to use such quality Pokemon as Parasect and Bastiodon that I'm sure enriched the game for everyone, but if you set aside your line in the sand over Pokemon being cut, it's I think pretty clear Sword and Shield are the best games.
Sun and Moon were just awful. I could easily go on a long rant since honestly almost everything about them was bad compared to the entire rest of the series, but you're not going to even begin to convince me the game that gave us Pokemon Tauros simulator, festival plaza, bottle caps with zero efficient ways to grind experience, z-moves, super overpowered Tapus, and a million super long time wasting cutscenes was anything but bad.