Repurpose old compressor
No, and the dead giveaway is the colors of wire on the former compressor.
Red and black are colors used for low voltage wiring on vehicles.  Black is the normal current return path.  And because vehicle 12V/24V is not particularly dangerous, they just use the vehicle chassis as the current return path.   There is no safety ground on vehicle wiring. The thing you call &quot;ground&quot; is in fact the current return (negative usually).
Black and white are colors used in AC &quot;mains&quot; 120V power.  Black is &quot;hot&quot; and white is &quot;neutral&quot;.  Neutral is a concept new to you: It is the normal current return path, but it is separately wired, insulated, and treated same as a hot conductor. Because 120V is dangerous.
Then there's a totally separate safety ground, which handles ONLY fault currents.  Nothing should ever be electrically connected to this; it only handles current during emergencies.
So because of the way the term &quot;ground&quot; is used in different environments, you got different things confused.
However, the big mistake was connecting a 12V or 24V compressor to 120V and expecting the electricity elves to take care of making that work.
That compressor is fried.  It's a goner.