When an ebike powers up and doesn't run, but will spin its wheel when off the ground, that is often a sign of a weak battery. It has voltage, but not enough curremt.
Looks like +12V lead acid batteries on your bike. If so, an automotive shop or battery store knows how to load test them.
For something like a bike, lead acid is relatively cheap, but heavy, and has short life.
.