Timeline of Rick and Morty:
Event1: Rick & Morty (A) go to the Snake Planet to kill snakes. Rick & Morty (B) gave them the information to make the snake time travel. Rick & Morty (A) go back in time to give time travel technology to snakes.
Event2: Rick & Morty (A) returned to the earth to continue fighting the snake. After the snake was destroyed, the future Rick and Morty (C) assigned a study task. At this time, Rick & Morty (A) was transformed into Rick & Morty (B).
Event3: Rick and Morty (B) who completed the learning task went to the Snake Planet to give Rick&Morty (A) time travel information in Event1, and then returned to the earth to become Rick and Morty (C).
Event4: Rick and Morty (C) who returned to Earth gave Rick & Morty (A) in Event2 a study assignment, and then went to enjoy Eggnog for Christmas!
World Timeline:
The timeline in this episode is better understood with parallel universes.
Parallel Universe 1: Morty kills the astronaut snake and replaces it with an earth snake. There are snakes coming to attack Morty. Rick and Morty go to the future to destroy the time machine, only to discover that the snakes in this parallel universe didn't invent time travel.
Parallel Universe 2: Rick and Morty came to this parallel universe in 1985 and gave the snake the technology of time travel, and Parallel Universe 1 became Parallel Universe 2. After the snake got time travel, the society was in chaos, and the timeline was modified everywhere. The time police go back to ancient times to kill the snakes. Note: The snake that attacked Rick & Morty in Parallel Universe 1 is from Parallel Universe 2.
Parallel Universe 3: After the snake is extinguished, Parallel Universe 2 becomes Parallel Universe 3. There is no intelligent snake in this parallel universe. Rick and Morty in this universe are tasked to give Rick & Morty the time tech of the snake in Parallel Universe 1, then return to this universe to task Rick & Morty, and then go drink Eggnog.
Ouroboros
It's interesting that the whole event forms an ouroboros: you will find that the whole incident of Rick and Morty being attacked by snakes is a ring: because the snake attacked Rick, Rick helped the snake learn time travel; because Rick helped the snake learn time Travel so the snake can go back in time to attack Rick.
Then the causal theory of this thing gets interesting: why did Rick give the snake time technology? Because the snake came and attacked Morty. Why can snakes attack Morty? Because Rick gave the snake time technology. So it follows: why did Rick give the snake time technology? Because Rick gave the snake time technology!
Want to know more about ouroboros, recommend a movie: Predestination (2014). The difference is that there is no concept of parallel universes in this movie.
View more about Edge of Tomorty: Rick Die Rickpeat reviews