The first time we read Captain Marvel's origin is in the comic that started it all - Whiz comics #2 (published December 1, 1939). Here's a brief account of Cap's origin as told in this comic. Billy Batson is led by a mysterious stranger to a meeting with the wizard Shazam. Shazam has Billy speak his name and transform into Captain Marvel! Shazam commissions Cap to be his successor and fight evil in the world. Then, as Captain Marvel says, "Shazam!", a massive granite block falls on Shazam and he is seen no more.
The second time Captain Marvel's origin is told is in Whiz #47 published on September 15, 1943. Billy is trying to find information on his birth certificate and returns to the orphanage he spent some time at as a young child. Here, a nurse uses magic cards to try and help determine Billy's age. We don't find out Billy's age, but we do get a truncated telling of Captain Marvel's origin! I won't comment much on this one as it is so short compared to the original telling in Whiz #2. However, we can see a slight change in the sequence of when Shazam is crushed by the huge granite block.
The Marvel Family #1 (published November 21, 1945) gives us Captain Marvel's origin as told by Shazam himself. This origin slightly changes the sequence of events from Whiz #2 and adds some additional information. Compare the story below with the one from Whiz #2.
Notice that in this origin, Shazam dies right after Billy transforms into Captain Marvel for the first time. Then Shazam comes back in ethereal form and gives Captain Marvel his mission of fighting evil on earth. Shazam also adds that if he is ever needed, Cap only needs to light the incense burner and he will return.
The next time we are given Cap's origin is in Captain Marvel Adventures #80 (published October 29, 1947) in the story, "Captain Marvel in a Twice Told Tale." Interestingly, this story also has the first villain Cap ever faced, Dr. Sivana. Here we have Sivana, tired of always having his schemes foiled by the Big Red Cheese, creating a way to go back in time to destroy Billy Batson. Sivana schemes that if Billy Batson is destroyed, Captain Marvel will never be created! This version of Cap's origin follows the sequence presented in The Marvel Family #1 and has the additional information of Shazam saying, "So it is written that I must go!" (Based on some research, I believe when Shazam says, "So it is written that I must go!" he is referring to what has been written in The Book of All Knowledge as seen in Captain Marvel Adventures #93. I'll have more to say about that in an upcoming article!)
Captain Marvel Adventures #100 (published July 1, 1949) gives us another re-telling of Cap's origin. Once again Sivana, with a captured Tawky Tawny, goes back in time to destroy Billy Batson. Sivana's plot is foiled this time by Tawky Tawny, and Tawky has the privilege of seeing with his own eyes the first meeting of Billy Batson and the wizard Shazam - and the first appearance of Captain Marvel! This version of Cap's origin follows the sequence introduced in The Marvel Family #1 and Captain Marvel Adventures #80. However, this one also includes Shazam's words from Whiz #2 that Captain Marvel was to be Shazam's successor!
"Captain Marvel and Sivana's Time Trap" from Captain Marvel Adventures #121 (published April 4, 1951) gives us our final recount of Cap's origin. It follows the origin as told in The Marvel Family #1, Captain Marvel Adventures #80 and #100. It again has Shazam telling Captain Marvel is to be his successor and that, "So it is written that I must go!"
Captain Marvel's origin was told six times over a span of 12 years. While the vast majority of his origin was consistent, we find that there were some slight changes to it made in The Marvel Family #1, and those changes remained throughout the rest of Cap's published history.