For it to go “off”, you need to drive faster than 12 km/h (~8 mph)
1)..Check tightness of both battery terminals. Many times this is caused by a loose battery terminal.
2)..To reset the ABS system, turn the ignition switch to the OFF position, and then to the ON position again. If that doesn’t work, let it sit overnight with the battery disconnected, and see if it resets.
3)..Clean the ABS sensor ring on each wheel (located near the axle).
Check the speed sensor for any obstruction or damage. A frequent cause of erratic ABS lights is a bent ABS sensor trigger wheel, which can happen when the tire is being changed.
4)..Erase memory of ABS unit: You need to connect two cables from red connector and follow the manual to erase memory of ABS Unit. (This might not apply to the 1st generation 2017 to 2019 Rebel 300/500).

5)..Clean the rear brake linkage, then lubricate with lithium grease. (Rear brake pedal can stick, causing brake light to stay on and ABS light to flash.)
6)..Not for all bikes – ABS problems can be caused by a broken ABS sensor wire near the front forks that is fatigued from turning.
7)..Probably not the problem, but check your emergency flasher switch. To clean it, operate the switch 20 times or more and spray contact cleaner or WD40 inside the switch.
.
When ABS activates, it turns on the emergency flashers. If the emergency flasher switch was corroded and malfunctioned, it could interfere with the ABS.
Other causes:
•Incorrect tire pressure.
•Incorrect tire size.
•Bumpy roads.
•Wheelies (front wheel off the ground when riding).
•If only the front or rear wheel is rotating
Note: don’t worry – your brakes will still work! – if the ABS indicator stays on, your brakes will continue to work as a conventional system, but without the anti-locking function.