How can I repair this damage to the walls in my garage?
Steven and I were typing at the same time, I've explained and elaborated a bit more FWIW. Neither of us really needs the points :)

It appears the wallboard was cut a bit too long during installation and it was forced into place, causing some pieces to spall off. In removing the spalled pieces, the paper was further torn. Ideally, you want a small gap here so any water on the concrete does not wick up into the wallboard. As long as this area does not get wet, it's nothing to worry about.

It's difficult to completely remove polyurethane foam from concrete. Scrape off as much as you can, then hit it with a wire brush mounted on a drill or angle grinder. You can level off the spalled areas with joint compound, then paint for a clean neat appearance.

Other than being unsightly, it's not really hurting anything. Remediation would be pretty low on my to do list.