He died in Transformers: The Movie, then he passed the Matrix to
Ultra Magnus. Ultra Magnus not choosen one, so cannot use the
Matrix. In the end, Hot Rod take the Matrix and transform into
Rodimus Prime.
Then at the end of Season 3, I think. Optimus Prime was reborned.
Then after that the Japanese took over the production of
Transformers. A few seasons later, Convoy ( Optimus Prime's
Japanese name ) was upgraded into Star Convoy. Which marks the end
of Generation 1 Transformers also.
Generation 2 was just a re-broadcast of Generation 1 and reissue,
recoloured some of the older toys and also produced some new toys
in the process.
After that comes Beast Wars, which is set in the distance future
and past of Generation 1. This time there was no Optimus Prime,
Optimus Prime was a great leader that lead the Autobots through
victory of the Great War. The leader of the Maximals ( Descendents
of the Autobots ) this time was Optimus Primal. He wasn't the
leader of the Maximal. He was just a normal Maximal that was sent
to escort Protoform X. He was grouped with a very small group of
Maximals as well. However, while their ship was in space, they met
Megatron ( Not the Generation 1 Megatron ). And they were told to
retrieve the Golden Disk that the Predacons ( Descendents of the
Decepticons ) stoled. They time travelled and landed on prehistoric
Earth.
After that comes Robots In Disguise, which features a new Optimus
Prime as a Fire Truck. This season has no link to the rest of the
seasons.
After RID comes Armade and Superlink, a 2 season series that are
linked, yes, the leader is still Optimus Prime, but no link to
Generation 1 either.
After Armada and Superlink comes Cybertron, its also a stand alone
series. Its leader is also Optimus Prime.