What was the Name of fighting machine cartoon on Cartoon Network?
You're likely thinking of
"Megas XLR", a Cartoon Network show that aired from 2004 to 2005.
It featured a giant, futuristic robot named Megas piloted by a lazy, but surprisingly capable, protagonist named Coop.