I love all of the original Mega Drive games and at different times have ranked each as my number one, but right now for the "classic" 2D Sonic's I'd say they are settled into this order:
Sonic 2 > Sonic Mania > Sonic 3 & Knuckles > Sonic 1 > Sonic CD
I would happily pick up and play any of them at any time, excluding CD which to me is objectively a worse gameplay experience than the others - despite appreciating the way it encourages exploration, the level design is too obtuse and lacks the refinement or focus of the other entries.
In terms of the 3D games... oh boy!
SA1 was impressive at the time for doing it's own thing in a world obsessed with copying the Mario 64 template, and there are some good ideas in there and fun stages... but it's just too much of a mess in terms of gameplay. When it works it can be fantastic, but too often it doesn't!
SA2 for me was a big step up, they got a better handle on how to design stages and mechanics for each of the gameplay types and focused on making that as good as they could at the expense of any more "adventure" elements from the original. Whilst it was a shame to see the open stages from SA1 get ditched I think it was the right decision and taken as an overall campaign I think SA2 is the stronger game. It was also an absolute visual triumph and great late swan song for the capability of the Dreamcast as well.
I kind of drifted away from new entries in the series for a while after the Dreamcast era (although I did get SA2 Battle on Gamecube) so Heroes, '06, Unleashed etc. are all things that I've only ever really played enough to know I don't have much time for them!
Generations was a decent effort that traded heavily on nostalgia, unfortunately it suffers in that by this point the 3D sections are just an exercise in boosting as often as possible and the 2D stuff just hasn't got the level design or physics to match the originals. Cracking soundtrack though
Forces was gash.
Frontiers I've only played through the first island but I actually really quite enjoy the "open zone" gameplay of it. Probably the strongest 3D entry since the Dreamcast days in my opinion!