Yes, they build a respectable fleet in a very short amount of time. Yamato is mothballed and the crew is scattered throughout the new fleet or retired. Earth gets a warning from Trelena of Telezart (those are the English names - can't remember the Japanese equivalent) about a large White Comet heading their way and they should be ready for it. IIRC, the EDF has become quite complacent and overconfident in their technology. Another interesting similarity/rip between Yamato and a later franchise is the backstory of the Excelsior in Star Trek III. Enterprise is mothballed in favor of the next-gen starship, highly automated and "soulless". When Yamato's crew decides to mutiny and leave for Telezart against orders, the break-out scene is reminiscent of the "Stealing the Enterprise" scene, complete with the new ship (Andromeda/Excelsior) being sent to stop them, which of course, winds up not happening. Although Captain Gideon/Hijikata was far more noble and honorable about it than Styles was. Japanese vs. American sensibilities at play there... Anyway, Yamato goes to Telezart around the same time the Comet Empire shows up and a big battle ensues, which Yamato loses but gets away - barely. Eventually, the C.E. makes it to earth and wipes out the entire EDF after being hit with every single WMG in their arsenal simultaneously and not even breaking a sweat over it. It pokes a big hole in what's left of Desslar's Gamilon fleet as well, who become allies of Earth because of this. Won't ruin the rest of it for you, but this should answer how Earth got into that fight. More like Yamato got into the fight and brought the Earth along for the ride!

It's honestly been almost a decade since I watched it, so my details are a little shaky, but that's the general gist of it.
It also shows how deeply Yamato's story informed later science fiction shows and films over the years. It was said that George Lucas even spent time over in Japan before writing his first treatment of "A New Hope" to get an idea of how eastern philosophies and storytelling worked, hence the Jedi being very much like spiritual Samurai warrior priests - and it doesn't hurt that R2-D2 is almost a complete rip of IQ-9/Analyzer.
