Cannondale MTB hydraulic brakes
Your first step is to attempt to bleed the system. The principal that makes hydraulic brakes work is that fluid is not compressible. When the lever is squeezed, fluid is pushed through the hose to the caliper. The displaced fluid needs somewhere to go, so it moves the brake piston towards the rotor activating the brakes. When the lever is released the fluid returns to the brake lever. The piston move away from the rotor and the brakes are released. When air is introduced into the system the fluid doesn't move the piston it compresses the air bubble. This gives you the spongy feeling. The fluid used varies by manufacturer and model. Using an incorrect fluid type can ruin the system. The bleeding method also varies so you need to check with the manufacturer for the correct procedure.