In some cases, a squealing noise is produced by the brake pads when activated. The noise could indicate the brake pads are contaminated, or have glazing on them from use or the brake pistons are sticking.
Please note these procedures are best performed by trained e-bike repair shops. Some of these repairs require specialized tools and skills that e-bike shops have.
1) check that the brake pads are not contaminated with the brake fluid or other contaminants.
Remove the calipers and inspect the pads for contamination.
If the pads have glazing on them from use, replace them or reinstall them and go to step 2 to try to remove the glazing.
If the pads are contaminated, you can try to clean them with Isopropyl alcohol.
If they are contaminated from the brake mineral oil, or can't be cleaned, replace the brake pads, reinstall them, and test the brakes.
2) If the brake pads have glazing on them, try the de-glazing process in the video below.
Learn more about keeping your bike in optimal condition.