Actually:
Captain Marvel originally was Fawcett, neither DC nor Marvel.
(In fact, Marvel was not Marvel then, but Timely cum Atlas; Marvel Comics was the name of a specific Timely periodical from around 1940 - sort of like DC, i.e., Detective Comics, became the official name of National.)
DC considered him a ripoff of Superman, sued, and won in the 1950s.
The name became dormant.
Marvel copyrighted it in the 1960s.
DC resurrected the character they once legally disputed, but changed the name to Shazam due to Marvel’s copyright.
Didn’t know that. Thanks!