Gen 4 is good, namely Platinum and HGSS. Vanilla Diamond and Pearl had a lot of pacing and QoL issues that were fixed in Platinum so play that instead. Gen 4 is the last gen that well executes the fantasy of traversing the untamed wilderness, though some people didn't like the sheer number of HMs you needed to get around climbing mountains and such.
Black and White are good. They are when the first symptoms of the franchise's decline appears. No more exploration, no world with routes that loop in on themselves. The world is a straight corridor you go down. Hardly any need for HMs besides surf. The adventure element begins to disappear. Also, you get exp share for your whole party, so there is no more picking and choosing which Pokemon to focus on developing for a particular leg of your journey. There is also no side activity to progress through like Pokemon Contests. However, there is still a lot of fun to be had. The regular NPC trainers are overall more difficult than in prior gens, and the final level was pretty tough and left me sweating. The story is also well written, with likeable characters and threatening villains and some good climaxes, but doesn't get too up its own ass or trap you in overly long cutscenes like the following gens.
XY is when things start becoming bad. First, the games from here on out are easy. You never feel challenged, neither in the adventure gameplay of traversing the world, or in party management, or in battle. The biggest selling point is Mega Evolution, aka super sayian transformations during battle, but only Kanto mons got them and there are no threatening foes to use them against. What little exploration was still left in BW is now completely gone. The games move away from the unique Japanese fantasy world of prior games, and instead start feeling like boring real life countries but with Pokemon. They moved away from 2D sprites to 3D models, and they just aren't as charming. Overall aesthetic downgrade. Being able to dress up your trainer is nice, though. Lastly, the story starts being conveyed in a frustrating manner. You walk forward 10 feet and then get yanked into a long unskippable cutscene in which usually nothing exciting happens. Most of the plot is boring. Another issue is that this is the first Pokemon game where much of the cast are unlikeable.
ORAS has some merits but are not replacements for Gen 3. Exp share makes combat and party management too easy. The game often automatically teleports you after a cutscene and heals your team to full so there is no attrition and trying to conserve items. You need to use a lot of HMs to get around again but you never feel like you are alone, trying to bushwhack thtough a huge untamed wilderness like in classic Pokemon. The rounded and oversaturated 3D models don't convey the rougher world of the originals. However, the game gives you easy access to most Pokemon in thd franchise released up to that point, including legendaries, which is nice if you want to mix and match a team of your favorites across nearly two decades of Pokemon. You now get mega evolutions for gen 2 through 4 Pokemon, but if you liked gen 5 and 6 mons then you are out of luck. Story is overall the same with a few new filler scenes. Main problem is that modern Game Freak tells the story through long cutscenes, so despite being the same plot deauence as gen 3 it takes 3x longer than it should to get to the point. Also, instead of using a menu to fast travel fly to s city you can instead manually fly on Latias/Latios over a miniature world map of Hoenn. Sadly this feature was discontinued.
Gen 7 continues to be mediocre like gen 6. You get the longest and most boring story to date. Instead of an exciting fantasy adventure, you instead get mommy issues. The villainous team are just angsty teenagers who hang out in the back alleys. Cast is boring again. Nothing exciting happens until the final boss fight which had a copout ending. Combat is boring easy, no exploration, world is just Hawaii, yadda yadda. You lose your favorite Mega Evolutions (technically not removed as a game mechanic until gen 8, but you need mega stones to mega evolve, but you can't transfer in keystone items from gen 6, and most mega stones in gen 6 were only available from limited time giveaways). You get Z moves, which are moves with fancy cutscenes that can only be used once per battle. Kinda neat but nowhere near as cool as megas. There are Alolan formes for gen 1 mons, ie a sparkly ice Vulpix or a surfer Raichu. Again if you liked mons from after Kanto then you're out of luck.
Ultimately SM was the last Pokemon game I bought. The series had been on the decline for 3 gens, and I wasn't enamored by the last 2 gens. The games had become too easy, the fantasy setting and untamed wilderness replaced by boring copies of safe real life countries with developed infradtructufe and lacked the high fantasy appeal of the early games, and the stories had become boring slice of life stuff instead of thrilling adventures. Not just dexit, but hearing that SWSH was pathetically easy, had no exploration, had another retard rival, was set in boring modern Britain, and the team were just sports fans rooting for their favorite trainer rather than actually threatening bad guys was the last straw for me.
After this I played a few fan games like Insurgence, which are kinda okay, but ultimately I just accepted that nothing would recapture the feel of classic Pokemon. I decided to move on with my life and find new things to enjoy.
P.S: I recommend some of the side games:
Hey You Pikachu: you get a Pikachu you can talk to with the microphone. Each day you and Pikachu get to walk around a forest or a lake, digging up acorns or meeting wild Pokemon like a Bulbasaur who cooks. Very chill. The game didn't properly define player expectations for the microphone. IIRC someone recently managed to get the microphone working on emulator and figured out what was happening under the hood. The game doesn't load all of the keywords in every level, so if you said something in one level, it might not work in another. You also can't say natural sentences. You want to say keywords by themselves.
Pokemon Colosseum: you play as a former gangster and robber who has helped impoverish and ruin the region and pervert what is good. The game starts with you blowing up your gang's base and embarking a mission to take back the Pokemon your gang stole and give it back to the people, purify corrupted Pokemon, and overthrow the tyranny you helped install. But just because you've become a defector doesn't mean people forget what you did before. Most people aren't friendly to you. It's not story heavy like a Final Fantasy game but it does have quite the vibe. The game is set in a barren, desolate wasteland with pockets of civilization centered sround a few watering holes. There are no wild Pokemon to capture or level grind against, instead there are a limited roster of like 30 Pokemon, so the game can be difficult as you have to pick the right Pokemon for the right job and manage the limited amount of resources you have. I remember the final level being pretty tough.
Pokemon Mystery Dungeon Explorers of Sky. The selling point is the very likeable characters and a well written story. Good ending. Gameplay is okay. It takes too long before you are allowed to recruit and customize your 3rd and 4th party member slots, but once you do the midgame becomes pretty fun.