In general the advice given by Nealh is spot on.
In my case, I had a Giant MTB and a road bike, then diagnosed with COPD and with it came a lack of lung capacity and weak leg muscles. I kept the road bike to use on a turbo-trainer and sold the MTB.
I tested a few ebikes at Rutland Water and coped with them quite well so bought a Giant Full E+ 1, which was great and I managed some steep hills reasonably well.
A couple of years later caught an infection and the lung capacity went to 30%, so sold the Giant, and bought an Oxygen (the model before the current version) which has throttle, which these days is essential for me.
My local routes are in the Wharfe Valley and hills below Harrogate and the bike copes really well - as for me, well lungs at 61% and fitness is good by using turbo trainer and a treadmill when weather is bad.