The motor doesn't handle the battery, the battery has to handle the motor and controller. (the controller does have to be rated for at least the fully charged battery voltage, and preferably significantly more so it has a safety margin, but it's still the battery that has to supply all the power demanded by the load placed on the motor by your riding conditions/etc.
The first thing you should do is determine how much power your bike will need to do the job you need it to do under the conditions you ride in. (hills, wind, road conditions, speed, acceleration, etc) You can use the motor simulator at ebikes.ca to guesstimate the power for various conditions.
Once you know the power necessary, you can pick a motor and controller that will do that job under those conditions. This also lets you get a battery that can supply the necessary current to run those, and be a high enough voltage to give you the speed you need with the motor you choose.
Then you can also use the information from the simulator for Wh/mile or Wh/km to guesstimate total Wh required for the range you need, so you can get a battery with enough capacity.