When brakes are new, unused for a period of time, or have been exposed to dirt and moisture, the brake pistons may be sticky and not retract fully creating a scraping noise.
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.
set of metric allen wrenches
TRP mineral oil
Follow the procedure in the video below to remove the calipers, inspect the brakes, loosen up the sticking pistons, clean the pistons, exercise lubricant into the pistons, and final cleaning and reinstalling the caliper assembly.
Learn more about keeping your bike in optimal condition.