For scooters, 33cc 2 stroke, or 50cc 4stroke (2BHP) gets you up to 35-37MPH.
65cc 3,5BHP gets you to 55MPH.
1BHP = 745.7Watt.
So for the speed you'll be needing you'll need to have around a 1500W motor.
The speed will depend on the wheel circumference. Mounting the wheel hub on small wheels will limit the top speed, but increase acceleration torque.
That being said, if you're planning on using a bicycle without suspension, I would recommend to not go faster than 15MPH, and mountainbikes with some form of suspension and disc brakes no more than 20MPH.
This because potholes can break the frame, and bicycle brakes on the rim, aren't strong enough to slow down from higher speeds.
Good disc brakes might be ok.
Also, the tires need to be meaty tires. You really can't use regular bicycle tires to go 40MPH. They do have a lot of stability issues.
Which is why most scooters have smaller rims, and wider donut tires.
Once you want to hit 35MPH, you'll also need good suspension of at least 3 inch when compressed (when you're on the bike). That means you'll probably need around 5" unloaded suspension travel.
As far as the battery, that will depend on the range you will want to go, and what you want in aesthetics.
If you constantly travel at max speed, the motor will be pulling 31 amps.
The cheapest battery that would work, would be this one:
https://bmsbattery.com/ebike-battery...k-battery.html
It's a 48V 30Amp battery, with a capacity of 10Ah, allowing you a range of about 20 minutes, or 13 miles at top speed.
Probably the cheapest, high density battery you can buy as an end consumer.
More than likely, you'll be driving slower, as most street legal mopeds are limited to 20-30MPH, at which your motor will be drawing about 10 amp, and can run you an entire hour, or 30 miles; effectively almost tripling your range.
Go at 20MPH, and your motor will draw about 6 amps, which is good for 1 hr and 40 minutes, or 33 miles.
I used to have an electric scooter,
It had a 1600W hub in the rear wheel, and a 48V 20Ah battery, with a range of 20 miles. On average, it would take about an hour and a half to empty the battery, however, the way I drove the thing, it often lasted me an entire afternoon.
Charging does take a lot of time.