The Transformers movie tells of what happened between season 2 and season 3.
All sorts of weird things went on in season 3, with StarScream's ghost and other strange stuff, before Optimus Prime was brought back to life at the end of season 3 in 2 part "The Return of Optimus Prime"...a story about an inter-galactic disease which made everyone fight against each other.
The last "straight US" episodes were 3 episodes entitled "Rebirth", for season 4.
This one introduced the HeadMasters and Target Masters.
Transformers cartoons then pretty much stopped in the US, but continued in Japan. The Japanese series continued pretty much where The Return of Optimus Prime left off, but completely ignores what happened in Rebirth.
Transformers in Japan continued with the HeadMasters series, MasterForce series, and Victory series.
Although Victory is the shortest (with only 32 episodes...both HeadMasters and MasterForce had 40+ eps), it is acclaimed as by far the best ever Transformers series according to fans.
There were a few more Japanese Transformers shows with a long lull, and then both the US and Japan jumped back in with the Beast Wars transformers. Currently showing is what is entitled "Car Robots" in Japan, AKA "Robots in Disguise" in the US.